Which device are you using?
Check if, in the programmer window, the device mentionned is the one you use. If not, either the one mentionned in the programmer window is the good one so you have to select in Assignements -> device your device, or the good is the one you selected in the Assignements -> device and then you have to change your system to fit your device.
It may be a solution for your problem but I am not sure!
Another solution is that the ptf file you selected in NIOS II IDE doesn't match the SOF file you enter in Quartus Programmer
good luck
éléa