(The above rendering comes from the RJPS translation, an adaptation of the NJPS translation. Before accounting for this rendering, I will analyze the plain sense of the אִישׁ terms, by employing a situation-oriented construal as outlined in “Notes on Gender in Translation,” pp. 11–16.)
Israel’s force has consisted of Judah’s contingent plus that of the other Israelite tribes, with both ostensibly under the king’s unified command, but at this point they are behaving as bickering confreres.
In the context of a parley (even an ad-hoc one), the use of singular אִישׁ profiles each militia as a constitutive party to their disagreement. Each militia’s members is construed as a unit while being situated as one of the two competing sides.
A “collective” construal of אִישׁ יְהוּדָה is evident grammatically, from the application of the quantifier כׇל, and from the first-person plural inflections. Meanwhile, a “collective” construal of אִישׁ יִשְׂרָאֵל yields a more informative and coherent text than does an individual construal (cf. the previous verse and the following one).
As for rendering into English, the NJPS ‘all the men of Judah’ and ‘the men of Israel’ miss the situational nuances. On properly rendering the collective usage of אִישׁ into idiomatic English, see my comment at Josh 10:24. Meanwhile, the fact that women are not in view is self-evident from the military context.