I'm going to skip all the jetpacks and spaceships and go straight into Singularity mode - Brain Uploading1.
As we get older, our bodies start to fail us more and more, and for some of us they were never a bastion of stability in the first place. The promise of being to upload our personalities onto a computer - either as disembodied programs wandering around in cyberspace, moved onto a clone or robot body, or powering a completely different chassis, this is the promise of immortality without needing to solve the biological mechanics of aging.
There are a lot of good examples in fiction:
- The "cyber ghost" concept can be found in William Gibson's Neuromancer, where digital "constructs" of a personality can be restored. Doctor Who has it as well with the Library Mainframe in the excellent Silence in the Library/Forest of the Dead double episode. Arnim Zola in Captain America 2: The Winter Soldier is another good example.
- Copying your personality onto a new body is the central premise of John Scalzi's Old Man's War. Also in Heinlein's I Will Fear No Evil, but there it's just creepy. Whedon's Dollhouse plays heavily with this as the central concept of the show. Oh, and Avatar, of course. And Zelazny's Lord of Light. I can go on, I think, quite a bit.
- Replacing a human body with a mechanical one is a bit rarer, I think, mostly because it's a bit of a subset of the first category. What I had in mind is works like McCaffrey's The Ship Who Sang, but looking into it shows that it's not brain uploading as much as a human hooked up to a ship. But there are still probably dozens of examples. I'm pretty sure Zelazny played around with it.
And now for the big question, do I think this will be possible in the coming decades? It's hard to say. Computing power and storage keep advancing, and replicating a human's consciousness inside a computer might be possible even without understanding how said consciousness works. I think I'll give it a solid "maybe".
1 I originally typed "Brian Uploading", which is a fine thing and I appreciate his efforts, but I'm not looking forward to it as much.