I wouldn't get too upset about it (please don't take that the wrong way - I have a pretty good understanding of how unsafe you feel!). From what it sounds like, you were opportunistically felt up by a young man with a grossly distorted view of (western?) women, and how to treat/relate with women in general. Perhaps the best thing you could do is introduce yourself to your Korean neighbours; knock on the door, say hello and give them a small gift of some sort. That will a) make you feel more secure and less isolated and b) ensure that they're aware you're there, and not just 'the westerner next door'. Remember, Koreans are by and large stupendously friendly, and socially much less tolerant of deviant behaviour. If they think you're in trouble, they will help you - particularly if you introduce yourself and become known as 'that lovely young foreign lady next door'. Strength in numbers and all that.
Also, I've had numerous people knock at my door at all hours of the night, mostly mistaking me for the landlady next door. I don't think that's unique, and has never been more than a nuisance (it also helps that Koreans are intimidated by tall, large, hairy men). Obviously, make sure you check who's there before you open the door, but also be aware that random door knocking is likely to be alcohol-induced and and/or accidental.
After all that, if you're sure someone is following you, then by all means stamp your feet until you are listened to!