Hey! Good to see you :)
So first, especially at his age, and when it's so consistent, medical causes have to be ruled out. ED can indicate some serious issues, including heart problems, so that comes first. Don't even mention the sexual frustration - mention that you're worried it's something serious, because it could be.
https://www.mayoclinic.org/diseases-conditions/erectile-dysfunction/symptoms-causes/syc-20355776
So, for your own needs, do you not normally masturbate even while in a relationship? I mean, I wouldn't talk about it right now, and I'd do it privately, but I don't see any reason why you shouldn't. It's not the same as connecting with someone intimately, but it might help take the edge off. A lot of people masturbate while in a relationship - for stress relief, to aid in falling asleep, because the mood strikes, or whatever.
Some people see that as wrong, some don't. Morally, that's up to you. Clinically and/or medically, there's nothing wrong with it.
Otherwise, I hope you're doing well. :)