17 mpg is not too bad. Unfortunately replacing the knock sensor is not easy, I suggest to erase the code for now and if the codes come back ON, you may considering replacing the sensor.
Here is more information about the code:
Nissan OBD-II Trouble Code P0328