Try to determine what you know and don't know.
Truck A:
Works trailer brakes OK.
I'd conclude the trailer is ok if it works on any truck and truck A is ok.
Truck B:
Trailer still OK.
Truck B seems like the problem.
I'd check the voltage output on pin 2 blue wire of the connector at the bumper.
Adjust the controller to Max output and use the manual operator and max out the braking. You should read 12VDC at this point with a Volt meter.
I'd check each wire in the connector particularly the brake output pin 2 blue wire and pin 1 white wire ground. Both wires are used when the brakes are applied. Check the connector for damage or bent pins, loose wires, whiskers (so no shorting) and tighten all the terminal screws.
http://rvbasics.com/techtips/rv-travel-trailer-plug-wiring.html