How To Program Atmega256rfr2 using ISP?
Thank you everyone, I finally managed to program it. It turns out that in the custom PCB I made one of the stitching vias was placed on top of the MISO trace, so it was always on ground. I did cut that line with a knife and it programmed with success. Your comment did help point me to the right answer.