First the UCMJ only applies on a military reservation - this happened in town it sounds like.
Next, I'm guessing Gasper made a pass at the victim and the victim said no and further said he was gonna kill him and was telling, so Gasper shot him.
I don't think there is a homo angle here guys
100% wrong. The UCMJ applies to all military servicemen at all times - on base or not.
From the U.S. Supreme Court case SOLORIO v. UNITED STATES:
'The jurisdiction of a court-martial depends solely on the accused's status as a member of the Armed Forces, and not on the "service connection" of the offense charged.'