1997 XJ6 will not rev passed 2000rpm

Hi all. I hope I’m posting this in the correct place.
I have a 1997 XJ6 that failed to start the other day. It would crank but not fire up and I had a zero rpm reading on the gauge while cranking. So I replaced the crankshaft position sensor and the old girl fired straight up but went for a drive and I can only get the rpm just above 2000 rpm then it stubbles, it feels like I’m hitting a rev limiter. Any ideas on what to check.
Thank you