Now that more of you have seen it, I want to paint you a scenario, that is probably unlikely to have been what they had in mind, but to me works.
When Luke stood over Kylo ready to kill him, and Ren brought the house down on top of him, Luke was fatally injured, he had enough strength to get to his x wing, and leaving R2 behind, set off to Arch too, the place where he "went to die".
He probably died on the way there, or just as he was arriving, with his x wing under the waves, not quite reaching the island he sought, but being a jedi he was able to accomplish in death, what he could not in life.
He studied the jedi books, and learned from Yoda how to make his ghost not look like a ghost, and the caretakers of the island took care of the maintenance, of the buildings and surrounding areas.
He pulled a piece of metal from the x wing and used it as a door, because he knew eventually someone would find him, he even aged himself to look like an older, greyer version of Luke, like what someone would be expecting to see when they found him.
He didn't want to go with Rey because he knew, sooner or later someone would see through his ruse.
When he projected himself to the salt planet, he abandoned his old man disguise, and showed himself at the age he died.
The experience drained him of the ability to look and act solid, and he faded away back on arch to, but his metal arm faded too, which it wouldn't have done if he died when we assumed he did after staring into the twin suns.
He was 6th sensing the whole time.