The 1864 militia census was a register of potential militiamen. Had men listed been available for conscription, they would have been in the army. A hernia would have been grounds for medical discharge/exemption from regular service.
You can also think of the 1864 militia census like a roll of potential jurors. These are men who could be called into service from a particular district, but just because they're on the list doesn't mean they were ever involved in any kind of combat or military service.