4 The king’s word, however, overruled Joab and the army commanders; so they left the presence of the king to enroll the fighting men of Israel.

Read 2 Samuel 24:4 Using Other Translations

Notwithstanding the king's word prevailed against Joab, and against the captains of the host. And Joab and the captains of the host went out from the presence of the king, to number the people of Israel.
But the king's word prevailed against Joab and the commanders of the army. So Joab and the commanders of the army went out from the presence of the king to number the people of Israel.
But the king insisted that they take the census, so Joab and the commanders of the army went out to count the people of Israel.