So was the throttle position sensor tested? {Disconnect the pedal position sensor connector. (b) Using an ohmmeter, measure the resistance between terminals VC and E2. Resistance: 1.2 - 3.2 kΩ at 20°C (68°F)}
That's the electronic throttle that you are unplugging. Unfortunately it's a motorized unit that opens and closes the throttle and the cable is just there as a safety and Toyota sells it as a complete assembly. If it's throwing a code it is most likely needing replacement. Those things are stupid expensive too. I used to sell used ones almost immediately.