“and if there is iniquity in me, let him put me to death.” This can also be understood as, “If there is any guilt in me,” because the Hebrew word translated “iniquity” is avon (#05771 עָוֹן), and it can mean iniquity, perversity, depravity, or guilt, or it can refer to the consequence or punishment for iniquity. Although it does mean “guilt” in this context, it also includes the wider meaning of iniquity.
Absalom was so blind to his sin and avarice that he did not think he had any guilt or iniquity, even though he murdered his brother and in a few short verses would attempt to dethrone his father David and thus likely have to kill him. It is because many criminals are like Absalom that righteous people have to be hard on crime. It is naïve to think that criminals will see their own faults, feel badly, and correct them. A few do, but most do not and just continue from crime to crime until stopped by an outside force. Being soft on crime only allows criminals to hurt more and more innocent people. When Christ is king on earth, he will not be soft on crime and ungodliness, he will rule with a rod of iron (Ps. 2:9; Rev. 2:27; 12:5; 19:15).
Absalom was not serious when he said what he did about being put to death. Not only was he blind to his own sin, he knew that his father had done nothing to him for murdering Amnon, and had even brought him back from Geshur to Jerusalem. He was confident (overconfident, but correct!) that David would not do anything to him now. On their parts, David and Joab were both naïve, and Joab himself ended up having to kill Absalom to save David’s throne (2 Sam. 18:14-15).