Leading up to confession and durring it I had forgotten about the sin and the putting it out of my mind.
Then you are fine. Not only that, but the sin has been forgiven. I was told, at my first confession, that any sins I could not remember at the time of confession were forgiven when I was absolved. As someone with a long and varied “misspent youth,” and a conversion at age 54, I had a lot to confess; I also have a damaged memory thanks to smoking too much marijuana back then, and 3 concussions.
It’s the fact that you couldn’t and/or didn’t remember it at the time of confession that makes the difference. If you had remembered it and deliberately held it back, then your confession would be invalid.
I’m not sure about your thoughts of forgetting, the night before. I’m confused about what actually happened. Did you just think about trying to forget? Or did you make an actual choice to forget? The second would be bad. (But has also been forgiven.)
In either case, if this had happened to me, I would confess having had those thoughts. Remember that you had forgotten about both having those thoughts, and about the sin, before you came to Confession. In my case, I would confess the forgotten sin too. It helps me repent, and forgive myself.
Oh, yeah… I also write them down during my examination of conscience, and take them with me. (no erasing allowed

!) One priest didn’t like that, but backed down when I told him about the memory damage, and when I promised to burn them afterwards. If I ever run into one that won’t, I’ll find another confessor.