99% of the time I hear this, the alternator has just been changed and people are convinced they
screwed something up during the fitting. Well, you did, we'll come back around to that in a bit.
Try cleaning the throttle body.
Then bench test the accelerator pedal.
If that doesn't work, try disconnecting the battery for 10 minutes (know your radio code).
Other than that, you will have to start continuity test the wiring.
Finally, the ECU could have a physical fault. Try taking it apart and reflowing all of the solder.
If that doesn't work, you may just need a new ECU.
The fix is easy to explain but a bit long winded and irritating... and subscription only.