The angel of death was sent to Musa. When the angel came to him, Musa struck him. In Sahih Muslim (2372a), the narration says that he put out the angel's eye.
The angel returned to Allah and said: you sent me to a servant who does not want death. Allah restored his eye (Sahih al-Bukhari 1339, Sahih Muslim 2372a) and told him to go back and say to Musa that he may place his hand on the back of an ox, and for every hair that his hand covers he will be given one year of life.
Musa said: "My Lord, then what?" Allah said: then death. Musa said: «فَالآنَ», which means: then now. He asked Allah to bring him near the Holy Land, a stone's throw away. In Sahih Muslim (2372a), his words are that he asks to die near the Holy Land «رَمْيَةً بِحَجَرٍ».
The Prophet ﷺ then said that if he were there, he would show his Companions the grave of Musa by the side of the road, near the red sand dune. Sahih al-Bukhari 1339 has "near the red dune", and Sahih al-Bukhari 3407 has "under the red dune".