Did you test your existing TPS first? I ask because you don't mention it and wiring it just as often the source of that particular code.
Toyota doesn't list the two as cross compatible but they're such a simple component it may work as long as the physical characteristics (size, mounts and deflection angle of the interfacing tabs) and the pin-out are the same. If the physical characteristics match then test the 5M unit with a multimeter to verify that the readings match what are required by the 7M-GE. When connected (and after testing to make sure you're not going to short anything out by even plugging it in) you should see a value of ~.50v on the VTA pin with the throttle closed and a value of ~3.48v with the throttle fully open.
Look at the list
HERE for vehicles which used the same TPS. Look at the section for part number "89452-14050" (which should be the same as your original).