It was a long and brutal campaign. The defending armies weren’t laying down arms and surrendering.
Five kings in the south joined forces, attacked the Gibeonites for making a treaty with the Israelites, and lost. The kings were executed, their armies slaughtered, and the towns (their civilian support) destroyed.
In the north:
Joshua 11:4-5 All these kings came out to fight. Their combined armies formed a vast horde. And with all their horses and chariots, they covered the landscape like the sand on the seashore. The kings joined forces and established their camp around the water near Merom to fight against Israel.
These kings also lost their part of the war: the armies were slaughtered, the horses crippled and the chariots burned, much of the population slaughtered, and some major cities destroyed.
Joshua 11:18-19 Joshua killed all the kings of those territories, waging war for a long time to accomplish this. No one in this region made peace with the Israelites except the Hivites of Gibeon. All the others were defeated. For the Lord hardened their hearts and caused them to fight the Israelites.
Did this campaign need to be as ruthless as it was?
No, in that the Canaanites were to be offered the option of running away. From a bigger-picture point of view, the Canaanites were occupants of the land at God’s pleasure, just as the Israelites were occupants until their sin led to Assyrian then Babylonian invasions, slaughter, and exile of the survivors from the land. However you look at it, you can’t argue that God isn’t even-handed about judging sin.
At a practical level, the Israelites had no prospect of peaceful coexistence in or anywhere near Canaan. The battles on the western side of the Jordan River, including a preemptive strike by one of the Canaanite kings, had already proven that. The attack by the southern kings on the Hivites of Gibeon (for making a treaty) confirmed it. From a military point of view, destroying armies, their kings, and even the civilian support was essential. No potential for regrouping could be allowed.
There was also no room for a religious coexistence. The Israelites fell all too easily into idolatry (the golden calf incident and the sin in Moab show that); the Canaanites were not people to be around (child sacrifice, rather immoral animal worship, and more). With God’s insistence on holiness, it was still, for the Israelites, an us or them situation. This invasion was establishing a theocracy.
It’s not a modern way of thinking. But it wasn’t a modern war.