Originally, the Uniform Code of Military Justice mandated that a rape conviction could be punishable by death. Under that Code, penalties punishable by death could be brought at any time, while all other offenses had to be brought within five years. In United States v. Briggs, three servicemembers were convicted of rape, but after their convictions the Court ruled in Coker v. Georgia, 433 U.S. 584 (1977) that the Eighth Amendment forbids a death sentence for rape. The servicemembers argued that the result in Coker required that their rape charges have a five-year statute of limitations, which would bar their convictions. The Court of Appeals for the Armed Forces agreed and set aside the convictions.
The Court, in an 8-0 decision by Justice Alito (Justice Barrett recused), reversed, holding that the convictions must be upheld. In essence, the limitations period for the rape charges was fixed by the Code at the time the charges were brought—allowing future events to change that would create uncertainty. In addition, the Eighth Amendment concerns raised in Coker are different from statute of limitations concerns, and Coker did not address whether it applied to military prosecutions. Justice Gorsuch noted in concurrence that he believes the Court has no jurisdiction to hear appeals from the Court of Appeals for the Armed Forces, but otherwise agreed on the merits.
A link to the opinion is here: https://www.supremecourt.gov/opinions/20pdf/19-108_8njq.pdf