Unless I'm sorely in error, one can only declare Conscientious Objector status upon initial enlistment or induction into the armed services. Eleventh-hour C.O. claims are regarded as illegitimate. This keeps people from placing other alliances ahead of their sworn duty.
For example, if I -- an American of Irish descent -- didn't like the idea of participating in military action against Irish people (if, say, the U.S. participated in operations to take out the IRA), I couldn't just go off half-cocked and say I wouldn't serve and claim C.O. status. I -- just like this Muslim -- would be correctly courtmartialed and tossed a dishonorable discharge.
-Jay