Optional, esp. in US Army.<quoted text>
US Military Oath of Enlistment:
"So help me God"
While federal law does not appear to make any part of the oath optional (see Title 10, Section 502 of the United States Code), military regulations often do. For example, the Army enlistment regulation (see Army Regulation 601-210, paragraph 6-18) makes the portion "So help me God" optional.
And military academy:
The Air Force Academy on Friday announced that it will now be optional for cadets to recite so help me God at the end of its honor oath.
The academy made the change in response to a complaint from the Military Religious Freedom Foundation, which advocates for the separation of church and state in the military.
........and more interesting reading further along.