So you have a California emissions spec. car? Only CA cars had the EGR temp. sensor until the later years.
In any case, the EGR temp. sensor code indicates that the sensor isn't getting hot when the exhaust gases are supposed to be reaching it (e.g. when the ECU is telling the EGR valve to be open).
The port feeding the plenum from the EGR valve is a common area for carbon blockage - so your problem probably isn't the sensor itself, but a partially or fully blocked port. When you have your plenum off for the knock sensor replacement, remove the sensor and start chipping away. I like to use an old professional grade dental pick that I found in my dad's tool box years ago. Then follow up with a straight tooth brush, and sometimes a drill bit (not attached to the drill) that's just a little smaller than the port. At some point, with the help of a couple of cans of brake parts cleaner, you'll get that area completely clean.
I suppose it's possible to get the EGR port partially clean while it's still on the car, but it would be much more difficult. In this picture I have marked the EGR port's entry into the plenum with a red arrow, and the port where your EGR temp. sensor is located with the green one. You can see that it makes a 90 degree bend, which is perfect for trapping carbon deposits.
Here's a good plenum article.
http://www.q45.org/plenum.html
While we're at it, do you know if your timing chain guides have been replaced?
Good luck!
Heath