From the sefer Mimaamakim, based on the thought of Rabbi Moshe Shapiro:
Why was Moshe so anxious to enter Eretz Yisrael? Why was G-d so adamant about locking Moshe from going into the land? The Sforno says that Moshe wanted to enter the land because he knew that if he was there the Jewish People would never be exiled and life would be good for them always.
At the time of the mis-step of the meraglim-spies the decree was set that the Jews of that generation would not enter the land. Moshe recounts to the people at the end of his life that, “G-d got angry at me as well on your account.” The decree included Moshe and Aharon.
Why could Yehoshua enter Israel and lead there, but not Moshe? Rabbi Shapiro (based on the Maharal) explains that Moshe was well suited to lead in the Midbar because Moshe was completely spiritual and the desert period was a time of supernatural existence in a supernatural place. Yehoshua’s essence was that of elevating life within the natural scheme. The whole idea of Israel is to be the base for Torah and Derch Eretz, spiritual existence within a material frame.
If Moshe had entered the land and paved the way then the spiritual level would have been exclusive and extreme and there never could have been an exile. Yehoshua’s leadership left room for exile, as the Jews tilted too much to the physical. Still, in the future Moshe’s prayer will be answered and he and his generation will all enter the land. Let it be soon, please G-d.