The throttle position sensor is a sensor, it "senses" a movement, which is how much the throttle blade is opening.
You have a problem of uncalled rpm increase which is done by a motor, in this case, its called the idle air control valve.
As @syncview already posted.
Reason to post.
Get your diagnosis aim straight first, in desi language, you were trying to address toothache by looking at your foot.