I checked the code and the USE_OLD_STYLE_WIRING. This will work even when not using an Uno. (On an Uno this is not needed). What this does is force the SPI interface to use these pins. By default the UNO has these pins as a hardware SPI interface.
I've attempted to recreate your error but I am failing.
I have a sketch that might help It was make by Nick Gammon back in 2012
it uses the same hookup you are using for the uploading of the bootloader
Serial is set to 115200 after hooking up the chip just reset the uno that you load this schetch and it will attempt to read the chip
on success i get:
Atmega chip detector.
Entered programming mode OK.
Signature = 1E 95 0F
Processor = ATmega328P
Flash memory size = 32768
LFuse = FF
HFuse = DE
EFuse = FD
Lock byte = FF
Clock calibration = B1
Bootloader in use: Yes
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 512 bytes starting at 7E00
Atmega_Board_Detector.ino (11.2 KB)