If a player who is flying is made to stop when does the falling damage happen? [duplicate]


If a player is flying in DnD and then for some reason is made to stop flying.

For instance a Druid in beast form if an eagle takes enough damage to drop eagle form, or a wizard flying due to an enchantment has that enchantment ended by an enemy or trap.

Are they considered to hit the ground immediately in the instance it happens or do they get an turn to try and do something about it? Is it dependant on how high they are, or where they come in initiative order?