How can one instruct a person to die?
Seforno: Hashem ordered Moshe (not to die, but) to accept death as an atonement for his sin. 1
As He goes on to intimate in Pasuk 51.
Why did Hashem see fit to mention Aharon's death?
Perhaps it is in response to Moshe's fervent Tefilah 3 to postpone his death until after he had entered and seen Eretz Yisrael. Hashem therefore answered that, since he and Aharon were both involved in the sin, 4 it would not be correct to grant him a temporary reprieve now that Aharon had died. (EC)
Rashi: After taking off Aaron's clothes one by one and placing them on Elazar his son, Moshe told Aharon to lie on the bed (in the cave on Hor ha'Har), to stretch out his legs, shut his eyes and close his mouth. He then left the cave and declared 'How praiseworthy is he who dies in this manner!' Refer also to Bamidbar, 20:26:1:1.
See Ba'al ha'Turim.
See Targum Yonasan.
As the Pasuk specifically states.