“How far off are we from being able to transfer a human consciousness to a machine?”
This is going to be an unpopular but true answer to your question.
We are just on the precipice of knowing that this will never happen and that it’s been science fiction all along, Johnny Depp be damned!
I know that this will not be the answer you seek, but to be perfectly honest, we don’t even know what consciousness is, what to speak of digitizing it and then copying it and then transferring it.
It makes for a great scifi story, but this type of thing will remain in the science fiction realm for the foreseeable future and most likely forever.
No, you will not achieve immortality in this way. Sorry.