Jesus said in Matthew 6:14-15, “For if you forgive others for their transgressions, your heavenly Father will also forgive you. But if you do not forgive others, then your Father will not forgive your transgressions.”
On the surface, it seems that Jesus taught that forgiving others was the way to obtain His forgiveness. However, Jesus did not prescribe an alternate means of acquiring forgiveness and salvation apart from repentance and faith in Him (see Matthew 4:17, 1 John 1:9, John 1:12-13, and 5:24). He also did not teach that forgiving others was required for salvation alongside repentance and faith. Rather, in context, Jesus addressed a heart issue.
Immediately before Jesus’ words in Matthew 6:14-15, He taught His listeners how to pray. That model prayer included asking God for forgiveness, having already forgiven others freely. He said in Matthew 6:12, “And forgive us our debts, as we also have forgiven our debtors.”
This portion of the prayer implies that a right heart seeks God’s forgiveness with the understanding that sins against Him are far more grievous, wicked, and numerous than those committed against others. Consequently, sinners seeking God’s mercy and forgiveness willfully and mercifully forgive others for their sins because they are minimal in comparison.
Therefore, in context, Matthew 6:14 conveys that those with a repentant heart are forgiven—not because they forgive others, but because of their lowly, penitent heart before God. (See Luke 18:9-14 for an example.)
On the contrary, an unmerciful sinner who refuses to forgive others for their minor offenses against them, compared to their own atrocious sins against a holy and righteous God, will not be forgiven by God. Or, as Matthew 6:15 says, “If you do not forgive others, then your Father will not forgive your transgressions.”
They remain unforgiven because their hearts are arrogant and unrepentant, and they fail to understand their depraved condition before God, thereby minimizing their sinfulness before Him while exaggerating others’ offenses. As such, God does not forgive sinners in such a state, for as James 4:6 says, “God is opposed to the proud, but gives grace to the humble.” (See also Matthew 18:21-35.)
I hope this brief summary helps answer why forgiving others is not a means to salvation and helps you explain it to those who question Jesus’ words in Matthew 6:14-15.