It sounds like you need to do a couple things. First you need to increase your overall food intake slightly, adding some good quality protein. Fish, chicken breasts, and very lean beef are good natural choices.
You can use protein powders, also. Whey protein or egg protein powders are preferred over soy proteins, due to more complete amino acid profiles.
The second thing you need to do is curtail some of your aerobic activity and increase your resistance training. Go heavy on lifting, and drop your extra cardio in the gym. It sounds like you get plenty of cardio in your military course.
Slowly add calories to your diet until you see weight coming on gradually. You do not want fast weight gain, or you can be certain it is fat.