Check the fuses for the trailer wiring.
If you have the towing package it is in the 7 pin blade connector next to your receiver hitch. and that runs back to underneath your dash for brake controller hookup. 2000 Chevy Silverado LT Ext Cab 4 dr 5.3L 4x4 Z71
There is a connection issue between the trailer brake controller and the trailer.
The 2001 Dodge Dakota, with a towing package, has a trailer brake built in. The trailer brake is part of the towing package.
They are what's used to connect the trailer to the trailer supply air lines.
The trailer has a dead short in that right side brake light circuit.
Trailer disconnected
Charge the trailer air brake system and check that the trailer rolls freely then stop and pull out the trailer air supply control also called tractor protection valve control the trailer emergency valve or place it in with the tractor to check that the trailer emergency brakes are on.
If you want trailer brakes you need a brake controller.
You have a poor or no ground between the vehicle and trailer.
video on how to replace parking brake cable in ford escape 2003
Brake controllers can be fitted to any type of trailer to be towed by another vehicle. When the driver presses the brake, a signal is sent to the brakes on the trailer ensuring the correct amount of pressure is applied for the trailer to stop at the same time as the towing vehicle thereby avoiding a collision.
If the 2004 GMC Envoy came with a tow package, then there should be a trailer brake controller harness. It would be located up under the dash near the brake pedal.