Contradiction with Matthew 5:39
This verse advocates for turning the other cheek instead of engaging in battle, whereas 2 Samuel 21:17 describes an act of combat and defense.
Matthew 5:39: But I say unto you, That ye resist not evil: but whosoever shall smite thee on thy right cheek, turn to him the other also.
Contradiction with Exodus 20:13
This commandment to not kill contrasts with the martial engagement depicted in 2 Samuel 21:17.
Exodus 20:13: Thou shalt not kill.
Contradiction with Romans 12:19
This verse speaks against taking personal vengeance, which contrasts with the action of revenge implied in 2 Samuel 21:17.
Romans 12:19: Dearly beloved, avenge not yourselves, but [rather] give place unto wrath: for it is written, Vengeance [is] mine; I will repay, saith the Lord.