The people living in the land of Canaan had already been placed under the ban (7:1–6). This means they were set apart for complete destruction as part of God’s judgment.
So this command refers to other nations. It applies to people whom Israel would fight outside the land (20:15).