Daniel,
Good question to ask, and brave of you to ask it.
The Bible doesn’t say much directly about masturbation. (Some people point to Genesis 38:9, but that’s not really about masturbation.) The Bible doesn’t seem to condemn the actual act of masturbation, but there’s more going on in our minds if we do it.
On the positive side, the Bible has lots to say about the goodness of sex. (Gen 2:24-25, 1 Cor 7:5, Song of Songs) Sex is part of God’s good creation and sexual urges is not a sign of sin but a part of being human.
However sex is for marriage, and works to bind a husband and wife together in a profound way. Sex in marriage is good, but any other sexual activity is a distortion of that goodness. That’s why such activities as adultery, casual sex and so on are condemned.
Masturbation can help us find sexual release when we cannot control our desire nor satisfy it through a marital relationship and in this sense it can be helpful. However it is almost inevitably associated with sexual fantasies and this is where it can go wrong and lead to sin.
Jesus condemns looking at women or girls in order to lust after them. (Matt 5:28) So perving at chicks, which lots of 17 year old guys would treat as normal, is a sin and offends God. It’s easy to get sucked into a cycle which fuels sexual desire to the point where it can’t be controlled. Perving at girls at school or at the beach, looking at pornography, worst of all internet porn, all fuel desire.
When masturbation leads to unhelpful sexual thinking and lust you are sinning and need to do something about it. Make the conscious, aggressive decision to look somewhere else, or go somewhere else, or turn the computer off or whatever it takes! Jesus promises that when we are being tempted, he’ll give us a way out. (1 Cor 10:13)
Ultimately I think that it is much better to resist the temptation to masurbate as you have been, asking God to help you day by day, and resisting the temptation to perv and treating women as sexual objects.
It’s good to wonder if you’re hurting God. You’re not. In fact you can’t! God’s grace is big enough to deal with any sin. He sent his son Jesus to die so our sins can be forgiven and we can be His sons. We struggle with sin, but that doesn’t mean we’ve killed our relationship. As God’s sons we can call on Him in prayer to help us in our temptations. I’ve prayed for you as I wrote this, you might pray after you read it.
Ian.