G-d gives it to him
The rule in spirituality, according to the holy books, is that the moment someone truly wants to reach a spiritual level, G-d gives it to him. The explanation is simple. G-d's light is always shining. He only wants our good. But we have to be a vessel to accept his light. To be a vessel means to "truly want it" with all your heart. This rule doesn't apply always with physical things, because although we can want something with all our heart, G-d knows that sometimes it's not the best for us. But in spiritual matters, the moment we truly want it - it's ours.
Sexual purity in today's world is a tremendous spiritual achievement, but it is not easy. However, it's not the purity which is difficult, it's "truly wanting it" that's difficult. For after all, the moment someone truly wants it, G-d gives it to him. We all know that it's easy to say "I want sexual purity", but to honestly want to let go of all the sinful lust that lurks in our deepest subconscious mind, only G-d knows if we truly want that.
So what do we do if we just don't want it enough? Prayer, Prayer, Prayer. "Poseach Es Yadecha Umasbiah Lechol Chai Ratzon". One way of reading this Pasuk is "You open your hands and bestow WILL-POWER (Ratzon) on all living things". G-d is not just the source of the light, he is also ultimately the one to make us into a true vessel to receive his light.
So pray to G-d to WANT it. Tell him you don't feel enough, in your deepest subconscious, a true need to be sexually pure and close to him. Ask him to open your heart to truly want this. And the moment you really want it, it's yours.