So it looks like that code is a bank two heater circuit 02 sensor code. I doubt that has anything to do with your transmission now, but in case you don't know when you start your car up cold, the 02 heater circuit cheats your PCM into thinking your exhaust is hotter than it is. It is only used at start up, so you should only get that code during cold starts. Meaning if you clear the code you should get it almost right away not during driving conditions.
I had the same code on mine when I first bought my jeep. and it ended up being a broken ground wire on my O2 harness side of the pigtail. I just repaird it, and it has been fine ever since, like 2 years now.
I am not sure how much of an electrician you are, but it isn't that difficult to trace a heater circuit for 02 sensor. There is only two wires per sensor, IIRC, and one goes to the PCM and the other goes to ground. So you can trace the ground wires to ground and you can trace the PCM wires to the PCM and make sure there are no breaks or corrosion.
As far as your transmission. I believe you. Unfortunately, you live on the other side of the world from me. It is possible that the front bearing lost a ball, or you have a broken tooth in your transmission, but if you put your clutch in and the noise goes away, then nothing in your transmission is moving, so it is pretty easy to say it is something in there.
It might be possible that it is in your transfer case also. You might be able to eliminate it by putting the transfer case in neutral. and the transmission in neutral, and pushing your clutch in and out and seeing if the noise is still there. Because putting your transfer case in neutral and your transmission in neutral should eliminate the transmission from moving and then letting the clutch out will make the transmission move even in neutral, but no torque through the back of the transmission. Any torque still going through the transfer case should be lost at the planetary gears, so nothing else in the transfer case should move or not enough to make any audible noise. It isn't exact but could be a deciding factor.
Thinking about it putting your transfer case in neutral really isn't going to help because even with your transmission moving in neutral, it isn't enough to move your transfer case anymore whether it was in neutral or in gear. in either case you are losing the torque in the planetaries. So don't listen to that garbage about the transfer case. All of the other stuff is true though.