We present here an extensive analysis of the protostellar jet driven by IRAS 20126+4104, deriving the kinematical, dynamical, and physical conditions of the H2 gas along the flow. The jet has been investigated by means of near-IR H2 and [FeII] narrow-band imaging, high resolution spectroscopy of the 1-0S(1) line (2.12 um), NIR (0.9-2.5 um) low resolution spectroscopy, along with ISO-SWS and LWS spectra (from 2.4 to 200 um). The flow shows a complex morphology. In addition to the large-scale jet precession presented in previous studies, we detect a small-scale wiggling close to the source, that may indicate the presence of a multiple system. The peak radial velocities of the H2 knots range from -42 to -14 km s^-1 in the blue lobe, and from -8 to 47 km s^-1 in the red lobe. The low resolution spectra are rich in H_2 emission, and relatively faint [FeII] (NIR), [OI] and [CII] (FIR) emission is observed in the region close to the source. A warm H2 gas component has an average excitation temperature that ranges between 2000 K and 2500 K. Additionally, the ISO-SWS spectrum reveals the presence of a cold component (520 K), that strongly contributes to the radiative cooling of the flow and plays a major role in the dynamics of the flow. The estimated L(H2) of the jet is 8.2+/-0.7 L_sun, suggesting that IRAS20126+4104 has an accretion rate significantly increased compared to low-mass YSOs. This is also supported by the derived mass flux rate from the H2 lines (Mflux(H2)~7.5x10^-4 M_sun yr^-1). The comparison between the H2 and the outflow parameters strongly indicates that the jet is driving, at least partially, the outflow. As already found for low-mass protostellar jets, the measured H2 outflow luminosity is tightly related to the source bolometric luminosity.