I am a Christian boy, 18 years old. I have a severe problem regarding masturbation and pornography. At the age of 13 I was addicted to pornography. I was struggled with it for many years and it because a habit. Each time I fall into sin I decide not to do it again and ask God to forgive me. But at that time I would be confused whether God had really forgiven me or not. After 2 or 3 weeks I would fall into sin again. So now I am in a dilemma whether God will not forgive me forever. How can I get salvation? How can I lead a holy life?
I want to say one more thing. Earlier this year I got baptized, but after three weeks I fell into sin. Now I am thinking that in being batptized I commited a sin against God so God will never forgive me. Is it true?
An odd thing is happening. A boy who is struggling with sin is deciding on his own what God will or will not do. His decisions aren't based on what God said, but his thoughts about how he thinks God should act.
"Seek the LORD while He may be found, call upon Him while He is near. Let the wicked forsake his way, and the unrighteous man his thoughts; let him return to the LORD, and He will have mercy on him; and to our God, for He will abundantly pardon. "For My thoughts are not your thoughts, nor are your ways My ways," says the LORD. "For as the heavens are higher than the earth, so are My ways higher than your ways, and My thoughts than your thoughts" (Isaiah 55:6-9).
God doesn't have limits on His forgiveness like men too often have.
But let's look at your problem of repeated failures. Often when a boy tells me he tries to stop but keeps going back to pornography, the foremost reason is that he is trying to give up pornography by no longer ejaculating. This never works because the male body has to ejaculate because you are constantly producing semen and you have limited capacity to store semen. The way semen leaves the body is through ejaculations -- either through sex when you are married, wet dreams, or masturbation. See: Is masturbation sinful or not?
It is pornography that is the sinful act. "For this is the will of God, your sanctification: that you should abstain from sexual immorality; that each of you should know how to possess his own vessel in sanctification and honor, not in passion of lust, like the Gentiles who do not know God" (I Thessalonians 4:3-5). What you need to do is battle the looking at pornography without worrying about the fact that you ejaculate. See: How do I break away from pornography and jacking off?