Military and civilian pay from the U.S. government is not eligible for exclusion on Form 2555 Foreign Earned Income.
Per IRS Publication 3 Armed Forces' Tax Guide, on page 9:
Foreign earned income exclusion. Certain taxpayers can exclude income earned in foreign countries. For 2020, this exclusion amount can be as much as $107,600. However, the foreign earned income exclusion doesn’t apply to the wages and salaries of military and civilian employees of the U.S. Government. Employees of the U.S. Government include those who work at U.S. Armed Forces exchanges, commissioned and noncommissioned officers' messes, Armed Forces motion picture services, and similar personnel. Other foreign income earned by military personnel or their spouses may be eligible for the foreign earned income exclusion if their tax home is in a foreign country. You won’t be treated as having a tax home in a foreign country for any period for which your abode is within the United States, unless you are serving in an area designated by the President of the United States by Executive order as a combat zone in support of the Armed Forces of the United States. For more information on the exclusion, including the definition of “abode,” see Pub. 54.
Note that any link in the information above is updated each year automatically and will take you to the most recent version of the document at the time it is accessed.