You were on the right track when you recalled that the Gospel of John addresses this:
On the evening of that day, the first day of the week, the doors being shut where the disciples were, for fear of the Jews, Jesus came and stood among them and said to them, “Peace be with you.” When he had said this, he showed them his hands and his side. Then the disciples were glad when they saw the Lord. Jesus said to them again, “Peace be with you. As the Father has sent me, even so I send you.” And when he had said this, he breathed on them, and said to them, “Receive the Holy Spirit. If you forgive the sins of any, they are forgiven; if you retain the sins of any, they are retained.” Now Thomas, one of the twelve, called the Twin, was not with them when Jesus came. (John 20:19–24)
Here are some things to keep in mind:
1) The apostles were the first Christian priests, and the ministry of the Sacrament of Reconciliation is handed down to each generation in the priesthood (even if the nuances concerning how this sacrament is conducted have developed over time). Some point out that in the above passage John states that the event happened among “disciples” of Jesus rather than “apostles.” Jesus had hundreds of disciples, a term which simply indicates that one is a student or follower. Of these disciples, Jesus designated twelve to be apostles. In light of this, some interpret the above passage from the Gospel of John as not pertaining specifically to the priesthood because the broader term of “the disciples” appears in verses 19 & 20 (as opposed to “the apostles”). Consequently, they claim that the forgiveness of sins should
only be seen as an aspect of the Church in general, and that there was no sacramental ministry along these lines given the apostles.
However, John
never uses the word “apostle(s)” in his gospel. Instead, he uses the term “the twelve” (or relies on the context) to indicate that the disciples in question were the apostles. This is why I included verse 24 in the above quote, as it implies that Jesus was initially speaking to the “the twelve” with the exception of Thomas. Moreover, when the next chapter describes how Jesus “revealed himself again to the disciples” (John 21:1), it is clear that these disciples are the apostles because some of them are specifically named. Naturally, because we are told that Jesus revealed himself to them “again”, this seems to indicate that they are the same ones he revealed himself to in chapter 20. Objectively speaking, is it possible for others to interpret all this differently? Certainly, which is why we must also keep in mind the next point…
2) As Catholics, in addition to Sacred Scripture we also use Sacred Tradition as the basis for our doctrinal teachings. Therefore, even though there is a strong scriptural basis concerning the Sacrament of Reconciliation, its validity does not depend on this. Moreover, the Magisterium is empowered by the Holy Spirit to define Scripture and Tradition without error, which is why possible alternate interpretations of such things as the above references concerning the Gospel of John are not a factor as far as Catholicism is concerned.
3) Some accuse the idea of sacramental Confession as being a Catholic “invention”. But they do not realize that it is also a historic belief of the Orthodox Churches. For example, consider this article from the Greek Orthodox Archdiocese of America:
Preparation for Holy Confession. If the act of sacramental Confession is a Catholic invention, how did Catholics convince the Orthodox Christians to do it without it ever being challenged by them? After all, they certainly do not have a history of blindly going along with everything Rome does. The simplest explanation behind such a universal belief is that it stems from authentic apostolic teaching rather than being a Catholic fabrication.
I also recommend that you read the following Catholic Answers tracts (which highlight more Bible passages in support of the Sacrament of Reconciliation):
Confession
The Forgiveness of Sins