1.
Avoid pornography. Exposure to pornography may trigger the desire to masturbate. ...( if you are doing any of this)..
2.
Stay active. It can be helpful for a person to find ways to occupy their time that does not trigger the desire to masturbate. ...
3.
Seek professional help with speaking to your GP about this matter and they might suggest other options to you.
4.
Spend more time with others.
5.
Exercise.
6.
Find a support group.