I'm having similiar issues with my 2003 Toyota 4runner v6 4wd. Popping a P0031 and P2238. Just changed the Bank 1 sensor 1 AF sensor and its still not fixed. Depending on the year of yours, here is a link to repair and diagnosis.
Monitor Descriptions — 2003 Toyota Truck 4 Runner 4WD V6-4.0L...