(Bamidbar 27:13) "Then you will see it (Eretz Yisrael), and you will be gathered to your people — you, too — as Aaron your brother was gathered" — whence we are apprised that Moses lusted after such a death.
(Bamidbar 27:14) "when you flouted My command in the desert of Tzin in the contention of the congregation": R. Shimon b. Elazar says: Moses and Aaron, too, died by kareth ("cutting-off"), as it is written (Devarim 32:51) "because you did not sanctify My name, etc." (the implication being) if you had sanctified Me, your time would not yet have come to die.