I misunderstood what you’re trying to achieve, my apologies! I thought you were talking about the gradient tool (which was why I wrote “draw gradients” in my first reply), but now I see you mean generating palette gradients using the “gradient” option in the palette Sort & Gradients menu.
There is no way to do what you need currently, as Aseprite’s palettes are one-dimensional, so a vertical selection is, to Aseprite, just a bunch of disjointed swatches. There’s no reason it shouldn’t be able to generate gradients within an arbitrary set of swatches though, so +1 to this feature.
In the meantime, if your palettes aren’t too big, you can probably get by with horizontal arrangements, in which the gradient option should work just fine. You can always arrange them into vertical ramps afterwards if you need to.