I have a 1998 XJ getting OBDII codes

P0138
O2 Sensor circuit high voltage (bank 1 sensor 2)

P0141
O2 Sensor Heater Circuit (bank 1 sensor 2)

Which sensor do I need to replace upstream or downstream?