Yes, you cannot take communion. Even if you do it will have no effect on you. Since it has been a long time since your last confession here are some reminders for you.
1. You always have the option to go to confession anonymously, that is, behind the screen or face to face, if you so desire.
2. After the priest greets you in the name of Christ, make the sign of the cross. He may choose to include a reading from Scripture for reflection. Then say: "Bless me Father for I have sinned. It has been (state how long) since my last confession. These are my sins."
3. Tell your sins simply and honestly to the priest. (You might even want to discuss the circumstances and the root causes of your sins and ask the priest for advice and direction.)
4. Listen to the advice the priest gives you and accept the penance from him. Then make an Act of Contrition for your sins.
5. The priest will dismiss you with the words of praise: "Give thanks to the Lord for He is good" or the "the Lord has freed you from your sins. Go in peace." And you respond by saying either: "His mercy endures forever" or "Thanks be to God."
6. Spend time with our Lord thanking and praising Him for the gift of His mercy. Try to perform your penance as soon as possible.
An Act of Contrition
Oh my God, I am heartily sorry for having offended Thee and I detest all my sins because I dread the loss of heaven and the pains of hell, but most of all because they have offended Thee, my God, Who art all good and deserving of all my love.
I firmly resolve, with the help of Thy grace to confess my sins, to do penance and to amend my life. Amen.
God bless!