Sure, but the US can actually try foreign military officers somewhat fairly. Almost no country in the world can accomplish that, other than perhaps the UK and Canada.
It doesn't matter if the trial is going to be fair or not. Doing this is the worst kind of betrayal that a military can commit against a soldier.
This is also why the US is not even a signatory of the ICC. It, by principle, opposes the sheer notion of Americans facing international trials for war crimes, even in impartial, third party courts. There's no way in hell it would extradite its spies to face trials for computer crimes.
It's arguments for not participating in the ICC are that the trials would be political, and not impartial. That's a stick with two ends.
Also consider how US treats 'threats to national security' - Chelsea manning, indefinite detention in Guantanamo bay, etc.