According to the commentator Rashi, the mention in verse one is a simple restatement of fact creating a bridge between texts ("And it was after the death of Moses: This is connected to the order of the Torah which ends with Moses’ passing, and this follows it") while the second is a reference to a deeper comment made by God:
" If he were alive, I would prefer him. The Rabbis interpret this
passage as a reference, not to Moses the leader, but to Moses the
Lawgiver, concerning the 3,000 laws that were forgotten during the
period of mourning for Moses. Joshua came and asked the Lord to repeat
these laws to him. Said to him the Holy One, Blessed be He: Moses My
servant has died, and the Torah is called by his name, implying to you
that it is impossible [to convey them to you.] Go out and occupy them
with martial activities."
So the first was fact, and the second was part of a deeper narrative.