Destroy target creature with flying. You gain 2 life.
If the creature with flying is an illegal target when Aerial Predation tries to resolve, it won’t resolve and none of its effects will happen. You won’t gain 2 life.
You must be able to target a creature with flying to cast Aerial Predation.