I suggest you test it as I suggested above... Plenty of information is available here and through a quick Google search
If you do not have a good ground, the proper 5V reference voltage to the TPS sensor, or the PCM is not getting the appropriate information from the sensor, then replacing the sensor will do nothing. At that point, it is a wiring issue not a sensor issue. Wiring can be fun and you need to be diligent to work through it.
And that is not saying that it is the TPS sensor to begin with. It is possible that a knock sensor is picking up something that it does not like at that specific RPM, causing the PCM to retard timing, further causing the hesitation you note. It could be something completely different as well, but you always need a starting point for any diagnosis or you will just end up replacing parts haphazardly which may fix the problem sooner or later, but will not be kind to your wallet.