How to stop levitation on Astral Plane?

I am an orc wizard in Nethack 3.4.3 and cast a lot of "levitation" spell on myself at Plane of Air. However, at Astral Plane I dropped the Amulet of Yendor to the ground due to a mistake. Now I cannot descend to the ground to pick the amulet up, even if self-polymorphed into a creature that can fly.


Finally I found the following message on Nethackwiki:

When you cast it at skilled or expert, the effect is the same as a blessed potion of levitation, leaving you in the air for 250 to 299 turns; in particular, you can land at will, using the > command. Note that you must be at the appropriate skill-level at the time of casting; if you cast it while Basic and then train to Skilled, you will not be able to land at will.

So I trained "escape spell" to "skilled", cast "levitation" again on myself and then press > to land .