2 Samuel - Chapter 12
In this chapter David is confronted with his sins of adultery and murder by the prophet Nathan. David recognises his guilt and confesses his sin:
Then David said to Nathan, “I have sinned against the Lord.”
Nathan's reply points to Jesus:
Nathan replied, “The Lord has taken away your sin. You are not going to die."
In the first letter of John, we are told how our sins are taken away:
"If we walk in the light, as he is in the light, we have fellowship with one another, and the blood of Jesus, his Son, purifies us from all sin. If we claim to be without sin, we deceive ourselves and the truth is not in us. If we confess our sins, he is faithful and just and will forgive us our sins and purify us from all unrighteousness."