The DMG, p 30, under "Mercenary Soldier:", states, "regular soldiers are 0 level men-at-arms with 4-7 hit points each." This subsumes any Constitution bonus to hit points (the range for normal men being 1-6 hp), so you don't need Constitution scores for these characters and can simply assign an average of 5.5 hp or roll 1d4 + 3 for individuals to obtain a final number of hit points.
If, for some reason, you want to determine Constitution scores for your 0-level characters, DMG, p 11, gives the following:
General Characters: Roll 3d6 for each ability as usual, but use average scoring by considering any 1 as a 3 and any 6 as a 4.
This gives an average score of 10.5 with a range of 6-15 to which should be added the +3 Constitution bonus for "Mercenary (level 0)" given on p 100, which also states these characters have "4 minimum hit points". The average Constitution for your regular troops therefore would be 13.5 with a range of 9-18 (+1 for dwarves and halflings (p 100)).
For your leveled fighter characters, DMG, p 11, states:
Special Characters, Including Henchmen: Roll 3d6 as for general characters, but allow the full range (3-18) except in the ability or abilities which are germane to his or her profession, i.e. strength for fighters, etc. For all such abilities either use one of the determination methods used for player characters or add +1 to each die of the 3 rolled which scores under 6.
Since the only ability germane to fighters (ie their prime requisite) is Strength, this leaves Constitution to be determined by a 3d6 roll to which should be added the +1 Constitution bonus for fighter NPCs from p 100. [Eta: Also of note is the minimum Constitution for fighters is 7, so rolls from 3 to 5 would need to be discarded (about 4.63% of rolls). This gives an average Constitution of about 11.78 with a range of 7-18 unless they are dwarves, halflings, or half-orcs for whom 19 is possible.
Since PHB, p 12, gives no bonus to hit points for the average score (11.78), I think you're fine rolling 1d10 or simply assuming 5.5 hp per fighter level, but technically the above adjustments actually produce an average bonus of about +0.34 hp, so you could give your fighters something like 5.8 or even 6 hp per level if you wanted to take Constitution into consideration.]