“Blessed is the man to whom the Lord will not impude sin.”
In spite of all that, under the Old Convenant the punishment was tempered with mercy. Under Old Testament law, which was the judicial law of David's day, the penalty for David's sin was death according to Deuteronomy chapter 22. The taking of another man's wife was an extremely serious matter. The time of this event in David's life was probably about 700BC. By the time of the Babylonian exile in Jeremiah 3:8, a bill of divorcement was given which was less brutal than the possibility of a stoning death to the offender. Under Old Testament law, David would also be condemned for the murder of Uriah. The law condemned David to death and no priest could absolve him of that sentence. David knew this and so he made his appeal directly to God and in doing so anticipated a day in which the Lord would no longer impude sin.
Let's be clear that there are real consequences to sin. The New Testament teaching is very clear that God put upon his own son Jesus Christ all the consequences for our sin. God's justice was demonstrated at the cross and the result is that we now receive His mercy. When it comes to your sin, when Jesus died for you it was all in future. You weren't even born yet he bore the totality of your sin upon Himself. Thus your sin was nailed to the cross and put upon Christ never to be brought up again.
Now the way into the kingdom is by believing. The sacrifice made on behalf of you is completed and finished. The view of the gospels in regards to people's broken lives is God's enabling grace meets them where they are at and takes them to where they should be. Grace empowered people to move beyond the law's restrictions. It could best be said the law keeps us out and grace invites us in. There are multiple examples of that within the scripture: the woman at the well, the ten lepers, the woman who broke the perfume over Jesus, and the woman with the issue of blood are just a few of those who under the law should not have approached Jesus and yet because of grace they moved toward Him.
The need of this hour is not to teach more doctrine, but to make Christ real to those who need hear the good news.Will we never sin again? Did Jesus die on the cross that I will never sin again? I ask you to show me a person who is not tempted or who never fails. Yet Jesus offers us grace (empowerment to be all we need to be and do all we need to do). I think when David said, “Blessed is the man to whom the Lord will not impute sin”, David was not talking about himself. He was talking about a future person or persons that would come into this grace and blessedness believing and knowing sin's power has no more dominion over them. The price has been paid in His blood and it is finished.