Do you have cruise control? If yes there will be two cables. One goes into the side of the transfer case and to a transducer mounted usually on the driver side wheel well. The other cable comes out of the transducer and goes through the firewall to the back of the speedometer. All connections have a threaded collar similar to hooking up a garden hose except the one in the back of the gauge just pushes on and has a spring steel clip that holds it in. If no cruise then its the same only one cable and no transducer. The toughest part is ripping the instrument panel out to get to the back of the gauge.
Do you have headers or manifolds? Sounds like manifolds if there are different lengths of bolts. Parts stores or places like Summit or Jegs sell header bolt kits, or you can match up what you need from a hardware store.