Goatley had been drinking with friends and wandered into a Dunedin house party — to which he had not been invited — where 50 people were socialising.
When people left the address in the early hours, Goatley ventured into a bedroom, unaware a woman was sleeping there.
He removed his jeans and shoes, climbed over her and lay down.
Later, Goatley kissed her and, thinking he was her boyfriend, the victim asked why he had shaved off his beard.
The defendant went on to rub her body and fondle her genitalia, stopping when she told him it was "gross".
At 4am, the woman's boyfriend returned and Goatley was thrown out.
"Of particular note, is that the offending was not fleeting but Mr Goatley remained there for at least an hour, during which time he made sustained intimate contact with the victim," Justice Dunningham said in a decision released yesterday.
"He also persisted in the assault despite the victim inquiring about his shaved beard, which should have clearly indicated to him that the victim was mistaken as to his identity. Furthermore, the emotional harm to the victim was significant with her being treated for anxiety and depression."
The judge accepted there was a real risk Goatley's employment prospects might be hampered by a conviction, but she ruled the offending was too serious not to be marked by a conviction.
"I agree with [the sentencing judge] that it is in the interests of deterrence and denunciation that the courts send a strong message that indecent or sexual assaults of intoxicated women will be met with a serious response," Justice Dunningham said.
Goatley was originally sentenced to six months' community detention, 275 hours' community work and nine months' supervision.
The appeal judge quashed the community detention — because of the impact it would have on the man's ability to study — and reduced the supervision to six months.
The rest of the sentence remained the same.