Levitate helps it if it gets hit by that move that changes your type to a water type...yeah. It doesn't function in gravity, sadly.
"
For 5 turns after this move is used, immunity to Ground-type attacks, as well as immunity to Arena Trap, Toxic Spikes, and Spikes as a result of the Flying type...