Deuteronomy 1:37, 38
37. Also the Lord was angry with me for your sakes, saying, Thou also shalt not go in thither.
37. Etiam contra me iratus est Jehova propter vos, dicendo: Etiam tu non ingredieris illuc.
38. But Joshua the son of Nun, which standeth before thee, he shall go in thither: encourage him; for he shall cause Israel to inherit it.
38. Jehosua filius Nun, qui stat coram te, ipse ingredietur illuc: ipsum robora, quandoquidem illam in haereditatem distribuet Israeli.
37. Also the Lord was angry with me. It is in no cowardly spirit that he transfers to them the guilt of unfaithfulness, which he had confessed for himself; but, since he had only fallen in consequence of being overwhelmed by their obstinate wickedness, he justly reproaches them with the fact that God was wroth with him on account of their sin. If under this pretext he had attempted to extenuate his guilt before God, or to substitute their criminality for his own, he would have done nothing else than double the evil: but, in reproving the people, he rightly and appropriately complained that the cause of his sin had arisen from them. As if he had said that they were so perverse that even he had been corrupted by them, and drawn into association with their guilt and its punishment. He here, however, adds respecting Joshua what he had before passed over in silence. His appointment as successor to Moses served to encourage the people; for it was a notable ground for hope that they should hear a provision already made, that after the death of Moses they should not be destitute of a leader, who would rule them under the auspices of God.
Why God preferred this man to all others, especially when Caleb is more highly praised elsewhere, is only known to Himself. We know that He chooses according to His own will those whom He destines to any charge, so that the dignity of men may depend upon His gratuitous favor. "To stand before" a person is equivalent to being at hand to do his bidding; and it seems that this was stated to be the condition of Joshua, in order that the punishment might be more manifest; inasmuch as, by an entire inversion, a successor is given to Moses, who had been his servant.