Nothing happens without determination.
The real treatment of stopping from lustful glances is to think at that moment:
“Allah SWT is watching me now and on the Day of Judgment I will be questioned regarding this.
And if Allah SWT condemns me for punishment what will happen of me?”
By recalling this repeatedly again and again
one will attain success.
Therefore, make determination.
This is the only treatment.
Initially for few days there will be some hardship indeed,
inshaAllah, it will become a habit.
And then the gratification and peace
you will find in it can only be imagined of.