Is it illegal for a US citizen to join a foreign military?
If it is not illegal, then, at some point, you may be involved in conspiring to kill other US citizens.
That is a simple fact.
Unless you think you can leave the other military when it looks like there might be a conflict with the US.