Though it’s after Lent, I think you should think long and hard about Christ’s final days. That is what always renews my love of God and devotion to Him. Do you pray? If not, start. If so, start praying more. You can ask God to help you to love Him more and follow Him more faithfully. God always answers those prayers!
I also struggle with chastity, though I’ve improved a lot lately. You won’t get over this terrible habit unless you love God with all of your heart, soul, and strength, though. Every time you think that you may fall to sin, think about everything God has given you and ask yourself why you would choose to offend Our Lord, who is all good and innocence, for a few minutes of bodily pleasure. Second, you need to learn about what chastity is and why it is taught. You have to internalize an understanding of Catholic chastity. You can read a lot about this online, but make sure you focus on Catholic websites. In terms of practical advice, stay busy, play sports, try not to spend much time alone, upload a porn blocker on your computer and lose the password, erase any files you have already, avoid sexually explicit or suggestive material, and pray frequently. When you feel tempted, get busy with something else, like doing the dishes, preferably around people. Empty your bladder. It sounds strange, but a full bladder increases sexual urges. If it’s at night, turn the lights on for a second. Pray three Hail Marys every time you feel tempted. If you do masturbate or look at porn, go straight to Confession with a priest who takes these sins seriously.
David