Crocodiles can live to be 100 years old, but they don't die of old age!
From a certain age, they simply stop feeding, starve.
Crocodiles are constantly growing, the older they get the bigger they get, but the bigger they get the more they need to eat.
So there comes a time when they just can't hunt enough food.
But does that mean that theoretically a crocodile in a zoo with the right diet would be immortal?
Yes, but that's only in theory. When a crocodile becomes very very old (and therefore very very big) its legs do not have enough power to lift the body (more than a ton anyway). And when the crocodile can no longer move, it refuses to eat, even if the food is put directly into its mouth and starves to death.