One the real, breh. I'd recommend seeing a cardiologist. It could be a number of things: poor circulation, P.A.D., chronic masturbation, coronary disease, an undisclosed heart condition, or you could just need to get in better cardiovascular shape. However, E.D. at a young age is generally a sign that something else in the body is amiss; if everything checked out with the cardiologist, then you should see a urologist and let them take it from there.
I know you're also aware that it may just be in your mind. Like, if you're worried about not getting erect with a woman, the anxiety of it all may prohibit you from attaining and maintaining an erection. You may be thinking too much about it and not allowing nature to take over.
Regardless, I wish you well on your journey.
Med school hopeful, Klutch