The LORD has chosen Zion, He has desired it for His dwelling. Psalm 132:13

Mighty warrior!

What has my Lord to say to his servant?” Jos. 5:14.

The message in the above verse, in Joshua — and the entire Bible for that matter — is that God is a Mighty Warrior, who will judge righteously and punish wrong. He is mighty. And His mere presence is enough to win the battle, for the "battle is the LORD'S" (1 Sam. 17:47).

The Commander is clearly Jesus Christ the Victor. (Rev. 19:11-16).  "…a white horse, whose rider is called Faithful and True. With justice, He judges and makes war. He is dressed in a robe dipped in blood, and his name is the Word of God. He has this name written: 'King of kings, and Lord of lords.'"

The Commander comes in vengeance upon his enemies in Jericho, and in armed might. When Joshua gets up from the ground, the Commander is gone. But Joshua can now go into battle assured, because he knows that God will be with him who told him, "Be strong and courageous. Do not be terrified; do not be discouraged, for the LORD, your God will be with you wherever you go" (Jos. 1:9).

God has made that same promise to us: "I will never leave you nor forsake you" (Heb. 13: 5).