The Bible tells us, “Share in suffering as a good soldier of Christ Jesus. No one serving as a soldier gets entangled in the concerns of civilian life; he seeks to please the recruiter” (2 Timothy 2:3-4).
This was Matthew Henry’s commentary on this Scripture:
I recently came across an article on The Washington Post where a senior general in the Air Force was fired after an investigation discovered he exchanged ‘sexually suggestive emails’ to a married female officer. The inspector found that he ‘demonstrated conduct unbecoming of an officer.’
This act ended the career of a seasoned general who had done many great things for his country. The military is now determining whether if he will retire as a three-star general or something less.
According to the U.S. Army’s S.H.A.R.P. (Sexual Harassment Assault Response and Prevention), this type of conduct is “cowardly, damaging, and a betrayal of trust.”
Adultery in the military is actually prosecuted under Article 134, which is also known as the "General Article." Article 134 prohibits conduct which is of a nature to bring discredit upon the armed forces, or conduct which is prejudicial to good order and discipline. 
President Obama had this to say about this matter: “The bottom line is, I have no tolerance for this. If we find out somebody’s engaging in this stuff, they’ve got to be held accountable, prosecuted, stripped of their positions, court-martialed, fired, dishonorably discharged — period.”
As soldiers for Christ, this is how we ought to conduct ourselves.
But sexual immorality and any impurity or greed should not even be heard of among you, as is proper for saints. (Ephesians 5:3)
...And For this is God’s will, your sanctification: that you abstain from sexual immorality, so that each of you knows how to control his own body in sanctification and honor, not with lustful desires, like the Gentiles who don’t know God. This means one must not transgress against and defraud his brother in this matter, because the Lord is an avenger of all these offenses, as we also previously told and warned you. For God has not called us to impurity but to sanctification. Therefore, the person who rejects this does not reject man, but God, who also gives you His Holy Spirit. (1 Thessalonians 4:3-8)
When this conduct goes on within the Church, it weakens her as it draws its participants away from pure devotion to Christ, the Captain of our salvation. In the same manner sexual misconduct has no place in the military, it has no place in the Church of Christ. Sadly, this act permeates both. And in the same manner the President called for those who commit these acts to be ‘held accountable’ and ‘stripped of their positions,’ we too, as Christians, will suffer the consequences if we allow sin to reign in our lives.
 Article, "Adultery in the Military" www.usmilitary.about.com