If the target artifact or enchantment is an illegal target by the time Natural End tries to resolve, the spell doesn’t resolve. You don’t gain life. If the target is legal but not destroyed (most likely because it has indestructible), you do gain life.