Heaven is in the distant future, when we have mastered time travel and use a machine to take snapshots of historically significant human brains at the second before their death. Capturing every macro and quantum reaction going on in that moment from long ago, the machine draws the information forward in time to a Utopian city where a freshly manufactured and youthful body is waiting to receive it as a bootstrap for its own consciousness.
Since the information includes every memory, attitude and emotion that was going on when the snapshot was taken, right down to the source's current incomplete thought, the newly booted consciousness doesn't even notice that the hardware of its mind has been changed.
To that new consciousness, the only confusion comes from the sudden change in what their senses are telling them. They instantly realize that they are in a new and different place, and having been so close to death just a moment earlier, they come to the only obvious conclusion...
"Wow, I've died and gone to heaven!"