Whoa...
...The 2 o2 sensor codes could definitely be tripping your knock sensor code. Replace those first and then, if a ks code is still present, replace your knock sensor.
You can buy from Autozone but it may be cheaper to order them online as well. Look to spend around $60, iirc.
Oxygensensors.com -
$50-70 <-click
Pinnacle Nissan OEM sensor -
$108.47 <-click