Jellyfish do not have enough adaptations to live outside of water. In order to do this they would need an excretory system for the osmoregulation and a true ambulacral system. Jellyfish typically only live for about a year and if they do not live for about a year it is most likely because they were eaten by a fish, turtle, bird or something like that. Another way they can die early is if they are not in salt water. Jellyfish need saltwater in order to stay alive.
When a jellyfish gets washed up to shore it cannot get back into the water. If you spot one lying on the beach you should never touch it as it can still sting you, even if it appears to be dead or actually is dead. Something that is rather interesting though is that when jellyfish wash ashore, they melt. All that will be left is some of its skin.