Why would you want to stop masturbating? It is a part of being human.
When. I was much younger, I was part of a strict Christian denomination that prohibited masturbation. In my experience, not only is it near impossible, the attempt is torture.
In my experience it is best to have a healthy acceptance of human nature.