IIRC Kerry was still in the military when he committed that treason, so wouldn’t UCMJ apply.
Kerry should not be allowed to galivant around the globe conspiring with foreign powers
There is a reason for that law and while it’s rarely used like many others it’s nonetheless possible to investigate and hopefully point this out
I think there has been some debate about that which prompted the Swift Boat Vets to demand that Kerry produce a form 180 to release his mil. records.
He never did so the debate remains an open question.
Or so I understand. :)
But, yes, you would be correct, if he was still serving at the time he would have been subject to the UCMJ.
It would still be treason for a civilian to do what he did.