If your boyfriend continues to see you as the “love of his life” as well, he should see a doctor. Not all sexual dysfunction is about feelings. Sometimes it is medical. He may resist seeing a doctor because he fears that something is wrong with him. I hope you can encourage him. If there is something wrong physically, the earlier it is treated, the more likely that the treatment will be successful.
If he is medically fine, then I’m afraid you do need to look at the possibility that he may not feel the same about you as you do about him. You two have been together since you were only 17. Often what people want and need in a romance changes as they move into adulthood. What was a fine relationship as teens isn’t what a person needs in his (or her) twenties. Your boyfriend’s body may be telling you what he can’t bring himself to tell you (and maybe even himself) verbally.
A conversation about this is very painful but necessary. Otherwise you could slide into a marriage because it is what is “expected” or the “next logical step”. Such marriages usually end up unhappy and often end in divorce. Both people regret the years they let go by without being honest with themselves and each other; both feel cheated out of years when they could have been with someone more appropriate.
I understand that thinking about separating is very, very difficult. It means confronting the possible loss of the future you thought you had as well as the man you have loved. But it also opens up other exciting possibilities for you. I hope you can find the courage to open the conversation.
I wish you well.