You need to do a bit more research
When is the code detected? The Engine Control Module (ECM) monitors the battery supply voltage applied to the electronic throttle actuator. When the power supply voltage drops below the threshold, the ECM concludes that the power supply circuit has an open circuit. A DTC is set and the MIL is turned on.
Considering you state you had a low / dead battery and needed to jump it the following falls in place.
Possible causes for P2118 2007 Toyota
Faulty Throttle Actuator Control Actuator
Electronic Throttle Control System (ETCS) harness is open or shorted
Electronic Throttle Control System (ETCS) circuit poor electrical connection
ETCS fuse ECM
P2138 TOYOTA Possible Causes What does this mean?
Faulty Accelerator Pedal Position (APP) Sensor
Accelerator Pedal Position (APP)
Sensor harness is open or shorted
Accelerator Pedal Position (APP) Sensor circuit poor electrical connection
Faulty Engine Control Module (ECM)