I forgot to mention in my reply, don’t forget the story of David confsessing to the prophet his sin. The prophet proclaims that the sin is forgiven. But there is punishment still.
So the penalty is sometimes still needed even after forgiveness. You are going to make it to Heaven, but you still have some temporal punishment and attachment to sin to work out. Indulgences work them out here on earth, and Purgatory after death before Heaven.
This is 2Sam12…and it is a beautiful passage of how one sees his transgression, condemns himself and confesses…and the absolution. Please read the whole chapter, but here is a part of it:
5
David grew very angry with that man and said to Nathan: “As the LORD lives, the man who has done this merits death!
6
He shall restore the ewe lamb fourfold because he has done this and has had no pity.”
7
Then Nathan said to David: “You are the man! Thus says the LORD God of Israel: ‘I anointed you king of Israel. I rescued you from the hand of Saul.
8
I gave you your lord’s house and your lord’s wives for your own. I gave you the house of Israel and of Judah. And if this were not enough, I could count up for you still more.
9
Why have you spurned the LORD and done evil in his sight? You have cut down Uriah the Hittite with the sword; you took his wife as your own, and him you killed with the sword of the Ammonites.
10
Now, therefore, the sword shall never depart from your house, because you have despised me and have taken the wife of Uriah to be your wife.’
11
Thus says the LORD: ‘I will bring evil upon you out of your own house. I will take your wives while you live to see it, and will give them to your neighbor. He shall lie with your wives in broad daylight.
12
You have done this deed in secret, but I will bring it about in the presence of all Israel, and with the sun looking down.’”
13
Then David said to Nathan, “I have sinned against the LORD.” Nathan answered David: "The LORD on his part has forgiven your sin: you shall not die.