Rashi on Joshua
I have already commanded you to be stong and courageous. This was said in reference to actual war, as it is said: ‘Have no fear or trepidation.’ Where was he commanded this? He was so commanded in the time of Moshe, as it is said: ‘and command Yehoshua son of Nun etc.’18Devorim 31:23.
Metzudat David on Joshua
I have commanded you to be strong in war opposite the enemy and to not be afraid.
Metzudat David on Joshua
It does not say "That I will be with you", even Hashem was saying this, an example of this is in Shmuel, "And he sent, and Shmuel" and the one who was speaking was Shmuel.