The Catholic Church teaches that no one comes to the Father except through Jesus Christ, and that due to the Incarnation (God became man) and the Redemption (the Cross), Jesus is the unique Mediator between God and man. The priest to whom we Catholics confess our sins to is a man - between that man and God is the Mediator, Jesus Christ.
Below Jesus there are sub-mediators - for example, God spoke only to Moses on Mt. Sinai, so Moses was a mediator between God and the Chosen People. The Catholic Church didn’t invent the practice of confessing sins to a priest - Jesus did, when this happened:
"Jesus said to them again, ‘Peace be with you. As the Father has sent me, even so I send you.’ And when he has 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'" (John 20:21-23)
The Catholic Church merely continues the tradition of the Sacrament that Jesus instigated. The Church didn’t replace Jesus as the one Mediator - that is your ignorant and misinformed view of it.