Is confession a sacrament of Jesus?

Yes. Jesus told the Apostles "Whoever's sins you forgive, they are forgiven them. Whoever's sins you retain, they have been retained." John 20:23. Bishops are the successors of the Apostles.