I suffered from the same problem about 3 1/2 years ago, however, due to my darned scrupulosity, I haven’t psychologically recovered from it. This has led to severe depression, despair and near-attempted suicide on more than one occasion.
In regard to the question, it certainly is not true. However, a candidate for priesthood must have demonstrated a good level of sexual integration for a period of two or more years (may vary, depending on circumstances and judgment by vocations directors, bishop and spiritual director(s)).
These habits can be hard to break, but it can help to reduce temptation through prayer and fasting. Some religious give up eating meat to aid in the battle for purity, by subduing the desires of the flesh. Being a previous student of nutrition, I was interested in this, and found a biological reason behind it. Many animal-proteins release androgens (testosterone, which primarily drives libido) when digested, and can imbalance the body’s hormones (increased testosterone). This can exacerbate sexual temptation, and what may follow is already understood.
I adopted a plant-based diet in April of last year, and it has helped me immensely. You could look at it as a kind of mortification, but it’s really a blessing.
However, we must fervently pray for purity! Ask Our Lady to intercede for you, as she is the Virgin Mother of God - the Spotless Handmaid of The Lord.
If you’re interested in trying such a diet, feel free to send me a PM.
God bless!