2 of 5 Removed inappropriate abbreviations.

How did the Court prosecute Col. Jessup in A Few Good Men

Here is an iconic dialogue from the movie "A Few Good Men"

Lt. Kafee: Did you order the CODE RED?
Col. Jessup: YOU GODDAMN RIGHT I DID!

My question is whether the evidence against Colonel Nathan Jessup was sufficient and compact to prosecute him and acquit the two marines?

During the course of the hearing, it is sufficiently proved that "Code Red" is an unofficial disciplinary action conducted at Gitmo. So Col. Jessup says he ordered it.
In the confrontation between Kaffee and Jessup leading up to the above dialogue, Jessup froth about the rigid chain of command within the Armed Forces with "We follow orders or PEOPLE DIE".
In the movie, the court takes this bit of information and combines it with Code Red confession in order to prosecute Jessup. Given that Code Red is confirmed by many men, this chain of command is not proved or endorsed by anybody other than Jessup. So it must stand as his interpretation of the chain of command and not a fact and therefore not a confession.

So even though I as a viewer in a theater want to "Punch in the face" Jack Nicholson for his amazing portrayal of Colonel Nathan Jessup, how can an unbiased court in the film prosecute him with the evidence at hand.

Also, what kind of punishment was he likely to get after his conviction?

I am not looking for opinionated answers but plot explanations/inconsistencies/holes if any.