Deuteronomy 3:28

But charge Joshua, and encourage him, and strengthen him: for he shall go over before this people, and he shall cause them to inherit the land which thou shalt see.

Moses himself was not to cross the Jordan to enter the promised land, though he was permitted to see it. God therefore laid upon Moses the work of preparing Joshua for leadership in his place. That preparation was to charge Joshua, and to encourage him and strengthen him for the task ahead. For Joshua would go over before the people, leading them across the Jordan, and would cause them to inherit the land that Moses would only be allowed to see.