3 of 5 Detailed the chain of command part of the question

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?

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". That a Marine officer will not & cannot ignore his superiors orders under any circumstances.
In the movie, the court takes this bit of information(i will not call this confession) and combines it with Code Red confession in order to prosecute Jessup. The Code Red practice is confirmed by many witnesses, but this "rigid chain of command" is not proved or endorsed by anybody other than Jessup. So it must stand as his interpretation that a superiors officers orders will never be ignored & will always be followed 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, Code Red doesnt mean an order to kill

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.