Jermaine Schmidt, 25, was sentenced in 2022 to five years' jail after a County Court jury found him guilty of raping the woman at the Puckapunyal Australian Army base in central Victoria.
The jury was told a drunken Schmidt let himself into the woman's room and sexually assaulted her in her bed.
It was alleged he then sent her several apologetic text messages a few hours later, saying he was "drunk" and "super sorry" for what had happened.
Schmidt pleaded not guilty at trial but the jury ultimately convicted him on charges of sexual assault and rape.
He challenged those guilty verdicts in the Victorian Court of Appeal, with his lawyer arguing there had been a substantial miscarriage of justice.
Justices Phillip Priest and Rowena Orr agreed, and on Thursday to set aside Schmidt's convictions and ordered a retrial.
In his written reasons, Justice Priest concluded there had been a miscarriage of justice because the trial judge did not permit evidence that Schmidt was of good character.
Schmidt's friend Clarissa Whitehead gave evidence but the defence barrister was not allowed to ask her questions about Schmidt's behaviour towards women while drunk and sober.
Instead, the trial judge only permitted evidence that Schmidt was an honest man who was trusted by those around him.
Justice Priest found the trial judge made an error when ordering the questions about Schmidt's prior behaviour be excluded.
"It is plain that the evidence that Dr Whitehead was apparently capable of giving - that (Schmidt) is a person who behaves respectfully towards women, including when he is affected by alcohol - was evidence of good character," the justice said.
Justice Priest found the exclusion of the evidence could have affected the jury's verdicts.
He granted Schmidt's appeal, set aside his convictions and ordered a fresh trial.