Welcome to e health forum.
Your issues are not erectile dysfunction, but it is psychological causes associated with dependence on porn for sexual pleasure.
Watching erotica occasionally once in a while is acceptable, but exclusive and excessive porn dependence for sexual pleasure and not having any sexual partners might be due to behavioural or psychological problems.
In the same way, too much of masturbation will cause penile fatigue, and this may cause temporary lack of strong erections.
The best way to address this situation is not via medications but via counselling and behavior therapy.
Removing all forms of porn either by locking it away or destroying it will reduce the impulse to watch porn.
Avoiding watching porn and substituting it with outdoor activities with friends or families or with workouts at the gym, would be the best way to stop your addiction to porn.
In addition once you get married, or have a commited sexual relation and a healthy sexual life, would definitely reduce the need for porn.
I hope this helps.