Correct me if I'm wrong, but Logia fruit users cannot "heal" by simply turnin into their element. They can dodge attacks and are usually immune to Haki-less sword slashes or bullets and the like, but they're not actually taking damage; simply turning into their element to avoid it.
Though even if I'm wrong, Akainu pierced right through Ace's body, causing internal damage as well; if Ace had only received external damage, he might have been able to survive despite his Devil Fruit being inferior to Akainu's, but here, a good deal of his internal organs were fried, so there was no way to heal damage this severe. Not to mention that even if he could turn into his element and heal, he was too weak to do so; Akainu's attack left him with barely enough strength left to speak before he died.