So i would check the ohms on the 2 parts and see if they match?There's 3 rough standards for different generations of throttle position sensors. Cummins is rather standard because they are used in commercial apps so using the same protocol as Navistar or Detroit is critical for builders.
I don't know what a GM pedal would use. Commonrail Cummins is a double redundant variable resistor. Many TPS's use an idle switch.
A check with an ohmeter should lay it out for you.