That’s the keyboard I use, years old. I picked up a late-2013 iMac from the Apple Refurbished store in August 2014 at a $350 savings, when my 2008 iMac died. The thing was identical to the brand-new iMacs.
The only complaint I have is that since the old, dead iMac was incapable of running, it was not possible to recover the Time Machine backup to build the new system.
Did you try starting it in Target Mode to use it as a Hard Drive? If it would power on at all, you can often do that. If not, remove the hard drive, buy an inexpensive case, and put the drive in it. . . you may be able to retrieve your files to a new user on your new machine. I've done that.