It’s a good question. I started hearing about it several years ago, but it’s called sexual assault by fraud/trickery/deceit/etc. The basic idea is that you can consent to sex with certain conditions or certain people. And that if those conditions aren't met, then it would be sexual assault. So a clearer example might be someone agrees to have sex with their spouse blindfolded but the person who actually has sex with them is someone else. Or someone agrees to have sex with their partner if their partner wears a condom, but either before or during sex their partner removes the condom. In each case, you're having no longer having sex with the conditions that you've agreed to. Because there isn't that consent, it's sexual assault.
It applies in this case because apparently the defendant thought he had sex with someone named Ashley. He did not realize it was the victim and that was due to deliberate actions by the victim. Therefore, the defendant was sexually assaulted. Not all states have this type of sexual assault, but apparently Virginia does.
However, that still doesn't mean the guy should have died or that the defendant should not be charged with murder.