now you know how I feel when I see a swap, anyways - if the loom is intact to the ECM - you probably only need to understand what the wires hanging around are for, they usually are for
ign switch power
start
fuel pump latch
speed sensor
A/C rpm
A/C clutch
A/C switch
engine rpm
dash coolant temp
check light
overdrive cancel switch
shift position indicators
now what I would do - is because the engine is functioning some parts of the loom are correct, pull the loom and trace each wire and take notes - (thats how I do it if I cant find the wiring diagrams) - then take reference from general toyota wiring colour codes.
btw - is the transmission a toyota ECT or fully hydraulic - if you say its a 1JZ transmission then it should be an ECT and if it shifts normally then the speed sensor and 3 solenoids inside the transmission valve body are functioning.