Simon,
Yep, adultery is a crime in the US Military, and you can go to prison for it...and it's a good law...let me explain.
When I was over in Iraq for the first Gulf War, my ex wife was having an affair with the guy down the street...a soldier who "lucked out" (in more ways than one) and stayed back instead of going to war. When I came home and found out the situation rather than reacting as any red blooded male WANTS to react...i.e. beating the dog snot out of the guy...I went to his commander...who had also been my Coupe Ferrei partner in Iraq, told him the situation and left it in his hands...when it was all over with the guy lost custody of his 2 year old son, lost his car, and went to military jail for 6 months and received a dishonorable discharge...which was harder on the guy, my beating him down, or the Army doing it for me?
It's against the law in the military to preserve good order and discipline...can you imagine being in a foxhole with the guy who was doing your wife?
Generally, the adultery thing is only persued in the case such as I've described, or when the spouse complains...I've NEVER seen a case where no one was making a complaint persued.