Resident aliens are required to pay tax on their military income and file a Form 1040.
Most members of the Armed Forces are US citizens, but not all. Resident aliens from many nations who are legally in the U.S. can sign up for military service. Just like citizens and other military personnel, resident aliens must pay taxes on any earnings from working in the armed forces.
Different treatment is rare, and includes requiring resident aliens with non-resident spouses to file using the married filing separate status, rather than the married filing jointly status.