The answer to this question is: Uniform Code of Military Justice
The Uniform Code of Military Justice differentiates the punishment of crimes if they're being conducted by the member of the military.
The court that handles this kind of dispute is called the military court and most of the regulations were made by the president and the chief of armed forces.