Jellyfish lifespan can vary according to the species and the environment. Some jellyfishes only live for a few hours while others can survive for much longer times in the wild. There is also a jelly species which is possibly almost immortal.
Jellyfish has multiple phases in its life. It transforms completely from one phase to another. You need to know the life cycle of a jelly to understand fully about its lifespan and “immortality”.