This is a case of in between turns effects, obviously. All in between turns effects must occur before any checks for KOs are done. So you could take the Poison damage, yes it would be KOed, but you still must resolve the effect of Flygons Body before anything is checked for a KO. The new active Pokemon takes no damage from Flygons Body if the previous was Poisoned and 10 away from being KOed. If the case was that you KO with the attack, and then they bring up a new Pokemon, then the new Pokemon WOULD take damage from Flygons Body. The same applies for if they KO your current active Pokemon, and you bring up a Flygon, they would take damage as you bring up your new active, which, in this case is a Flygon.
Now, obviously, this is all assuming the defending Pokemon isn't a {F} type, because if it is Flygons Body doesn't do anything.