כי אנכי מת בארץ הזאת אינני עבר את הירדן "For I [am going to] die in this land; I will not cross the Jordan" (Debarim 4:22). How do we understand what Moshe Rabbenu, 'a"h (Moses), is saying? If he dies in the land, then it is obvious that he will not cross the Jordan!
In fact, what Moses is referring to is the prior statement by G-d: כי לא תעבר את הירדן הזה "for you shall not cross this Jordan" (ibid., 3:27). G-d is making it clear that not even his remains would cross the Jordan, but would remain in the wilderness. This also explains the reason why Moses did not make Yehoshua' or the Children of Israel swear to carry his bones with them into the Land of Israel, in the same manner that he had carried the bones of Joseph, throughout the desert.
The fact that Moshe Rabbenu, 'a"h, is buried outside the Land of Israel is a very great kindness to the Jewish people by HaQadosh Barukh Hu (the Holy One, blessed be He). The fact that Moshe Rabbenu, 'a"h, will have to be resurrected and returned to the Land of Israel at the time of the final redemption, is a guarantee to all the Jewish people buried in the diaspora, that they will also return at that time.
(See Rabbenu Behayyei on the Torah, Debarim 3:27)
Parashat Va'etchanan, Wa-ethhannan, rabbenu Bachya ben Asher