You have heard it said, "It is a lawful oath" (here):
"In our current set-up, the oath we take is to defend the Constitution against all enemies, foreign and domestic. That is an oath I have taken in the past, and would be happy to take in the future. It is a lawful oath."
But I say unto you it is not lawful, not if you really follow Him whom you claim to worship:
"Again, ye have heard that it hath been said by them of old time, Thou shalt not forswear thyself, but shalt perform unto the Lord thine oaths: But I say unto you, Swear not at all; neither by heaven; for it is God's throne: Nor by the earth; for it is his footstool: neither by Jerusalem; for it is the city of the great King. Neither shalt thou swear by thy head, because thou canst not make one hair white or black. But let your communication be, Yea, yea; Nay, nay: for whatsoever is more than these cometh of evil." (Matthew 5:33ff.)
Take the oath if you wish, but don't call it Christianity.