Thank you for sharing your dream with us. Please take everything that I share to the Holy Spirit as He Alone gives the accurate interpretation.
You have a choice. What do you love more? Jesus or masturbation? You pick. He is with you in Spirit in the room when you partake of the sin. Are you comfortable with Him watching you?
Please note that these questions are not meant to embarrass you but are written as I felt led to share. Remember Zechariah 4:6 and be encouraged!