To stay or to leave?

My husband and I have been together for nearly 2 years. While dating, we agreed to wait until marriage to have sex.... well, we still have not had sex. We've tried, but it's always an excuse to not try or as soon as fore-play is over, he's done and can't maintain an erection. He can get an erection and ejaculate (I've caught him doing it himself, multiple times.) But nothing with me. We've tried therapy, we've tried medication. Nothing. I don't know what to do. We have a decent marriage beyond the sex issue and I'd hate to lose him in my life. But, I'm just not sure if I'm willing to give up sex and a future child. I grew in a home where divorce was not okay- you worked it out. My parent's have told me countless times divorce is okay in my situation. I just don't know what to do. Am I just being selfish?