Car Losr Acceleratation while driving

I have a 1997 Nissan Altima. As I was driving fine I noticed a feel feeling as I was pressing my gas pedal and then I lost acceleration. My car didn’t stop but nothing happened when I pressed the gas. My car just “coasted” at extremely low speeds. If I was going downhill the momentum made the car move but on an up road I barely moved. All the dashboard and headlights worked. I actually drove it 3 miles to my house and left it there. Originally I thought maybe something happened with the actual gas pedal but upon inspecting it seems fine. I did have a check engine light on. I forget the actual code but when I had the code tested it was for EGR - I believe it was p0404 but not positive.

Could the EGR cause that to happen? Maybe another issue. I should also note that was my was having a rough idle when I was stopped at a red light or something but when shifted gear to neutral or was actually driving the rough idle would stop.

Hope I gave enough details

That’s a good start. Take it off and clean it. Also check hose for leaks.

My mechanic told me it was my throttle body. Does this make sense?