> The UCMJ was established by the United States Congress in accordance with their constitutional authority, per Article I, Section 8, which provides that "The Congress shall have Power . . . to make Rules for the Government and Regulation of the land and naval forces" of the United States.
You can be ordered to take chemicals or medications which have not been FDA approved, and you can be put in jail for refusing.
You can under certain circumstances be compelled to testify against yourself (5th amendment waived).
It's sort of like that and not at the same time. Under the UCMJ, refusing a lawful order can put you in the brig, or a variety of punishments applied (NJP, loss of rank, loss of pay, etc.). Under most circumstances, forcing a service member to ingest an unknown drug is not a lawful order. Under official civilian authority you can be highly encouraged to take an untested vaccine or some such, and refusal, while not disobeying a lawful order, can end up with you receiving unpleasant treatment. (You are there under contract for a set period of time, after all, so a long period of time of unpleasant treatment can be motivation enough to do things you wouldn't normally want to do.)
I was able to avoid the anthrax vaccine around 2000 by refusing to sign a waiver. I ended up getting transferred to a new command shortly thereafter which was scheduled long before this anthrax vaccine situation, but I can't be certain that there were going to be any repercussions regardless of my decision because most of my fellow service members at that time were unwilling to be test subjects as well.
The information I have been able to find suggests that anthrax vaccine refusal rates were very low.
"An analysis of active-duty personnel deployed in an area potentially at risk to biological warfare reported just 5 out of 10,000 soldiers refusing the anthrax vaccine. Most of these cases were personnel that did not desire to stay in the military. While official records of total vaccine refusals are not available, it was reported that Pentagon statements estimated 350 servicemembers had refused the vaccine between 1998 and 2000."
Source: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9376337/
A good example - the Sikh believe that men should maintain their beards, and should wear a specific head covering. Freedom of religion/expression laws in the US prevent schools, or public institutions, from requiring those men to remove their head coverings or to shave. However, for the longest time, Sikhs who wanted to serve in the US armed forces had to chose between being religiously observant,or being eligible to serve (saying "no" in boot camp when they come by with the clippers does not a happy career make).
Even now, there's a dispensation for Sikhs, but in times of war/necessity, that goes out the window. (Tangent - the reason the armed forces have facial hair regs for men is a) conformity but also b) so that gas masks/CBRN protective gear can get a good face seal. Additionally, and this sounds dumb but it's true...helmets aren't designed for people to have a lot of hair under them, which is something women in combat conditions she had to encounter as well)
Both took a courageous step in leaking documents they knew could lead to their execution for simple moral convictions. That alone makes them more alike than not to me.
Snowden (veteran though acting in a civilian role) has had far more impact.
What Ellsberg and Snowden both managed to do was to make the story compelling and the information unescapable.
Consequences (your argument) or civillian status (raised elsewhere) are both exceedingly red herrings.