As long as you are accusing your boyfriend and saying he needs to get help, you are not going to get anywhere. Masturbation is not a replacement for sex. Just because he is masturbating does not mean that he does not desire you. Men and women masturbate for all sorts of reasons, only some of which are a substitute for sex with a partner. Making him promise not to masturbate is probably not a healthy approach.
Most people continue to masturbate when they are in a relationship.
So, all this does is to make him feel guilty and prompt him to lie to you. You, on the other hand, will feel suspicious and worry whether he is misleading you again. All of this will lead to mistrust and resentment. Plus, it shuts off all communication. It's far better to talk about it than to give ultimatums.