First, make sure you're not actually being hit by the attack. If you aren't, then chances are you're just attempting to cast too soon after you stop moving, and the game thinks you're still moving on the server's end (in other words, lag).

If you are still being hit...

Unlike XI, non-physical damage can interrupt your spells too (although that's not to say every potential form of damage can interrupt; some will not, like Titan's Tumults)

I'm not as sure about Hellfire or Earthen Fury, but I do know that Aerial Blast from Garuda almost always interrupts my attempt at Medica and whatnot if I start casting before it hits. The best way to get around this is with Surecast/Swiftcast.