“The Lord said to Moses saying: Ascend to this Mount HaAvarim, Mount Nevo” (Deuteronomy 32:48–49).19The actual words quoted appear in Deuteronomy 32:48–49, but the original command appears in Numbers 27:12. What did He see that led Him to say this after the portion of inheritance? It is, rather, that Moses heard: “You shall give them” – he thought that the Holy One blessed be He had reconciled with him. He said: I am allocating their inheritance to Israel. The Holy One blessed be He said to him: ‘My edict remains intact. “Ascend to…Mount HaAvarim.… as your brother Aaron was gathered” (Numbers 27:12–13). You are no better than your brother.’
Aaron — Teachings of Moses
Bamidbar Rabbah 21:13