It's never to late to turn things around. He might be 39 and a virgin but he can still change that if he improves his life and start to get in touch with his sexual side and start bedding women.
Come on, there are guys well into their 50s still gaming women on this website and getting a lot of sex. Why can't your friend who's hardly even turned 40 yet still turn things around?
If I was you I'd refer your friend to this site. He could learn a LOOOOT and transform his life.