Any codes? How fast can you get it to go? How long does it take to get up to top speed? Do your brake lights stay on? Did this slowly start to happen or just happen all of a sudden? I have seen lots of issues with the older JO5 engines. How many miles?
My first thought is turbo starting to seize/ VNT hanging or Charge air cooler plugged. But could be something as little as a brake switch. A little more data would help.