Although going to the doctor might not be a bad idea, it probably isn't needed yet. Seeing as your BF is in his early 20s, puberty is ending and his sex drive is balancing out to the point where he doesn't have erections as frequently any more. It isn't uncommon to lose an erection during foreplay, just as long as it can be brought back for the main event if you will.
Try having sex at different times of day as well. I find that having a very set sexual routine e.g. just having sex in bed at night, starts to lose its magic. Morning sex, typically aided by a sleep erection, is a great time in the day to have sex for a man.