Trump took that same oath, so that part doesn't solve the problem as far as I can tell.
But, a more important question:
The Brits didn't seriously go after Turing until 1952, long after he was really, really, really instrumental in winning the war (indisputably actually). Then, they just prosecuted the hell out of him for his lifestyle. I don't think he was actually a member of the military though.
en.m.wikipedia.org
How do you think the American military would treat a Turing in today's environment, if Turing was an actual member of the American military?