I'm sorry that a nun has corrupted your mind with feelings of guilt when you masturbate. Sex is a basic human need, and masturbating to fulfill it is perfectly natural. Most everybody does it.
I can understand your upbringing as it's similar to mine, in which I was forced to repress my sexuality for fear of being wrong. Maybe not exactly what you went through, but we both dealt with the same religious institution. Now, here I would say many a negative thing about that religion and it's views on sexuality, but I think religious discussion is frowned upon, at least outside of user groups specified for such, in this forum.
Either way, I hope you can find peace and break free from your feelings of guilt. Masturbation is perfectly okay and natural, like I said, as long as it doesn't become an obsession that affects other aspects of your life.
If you'd like further help than I can offer, maybe consult a counselor or therapist who can listen and offer ways to circumvent these guilty feelings you've been brainwashed into feeling. Just know you've been heard and that I can understand what you've been through.
EDIT: I decided to post this image of Maslow's Needs Hierarchy to show that sex is a basic need, under which masturbation falls. It's right there next to breathing and water.