What is the maximum acceptable gap between the jet bridge and airplane door?
In general, there is a gap between the jet bridge (also called Passenger Boarding Bridges or PBB) and the aircraft. This is due to various reasons like,


To prevent damage to the fuselage
The jet bridge may not fit all the aircraft similarly as their fuselage dimensions are different.


According to FAA Advisory Circular 150/5220-21C,


  The PBB should be equipped with sensors to safely prevent
  dangerous contact with the aircraft


The jet bridges at most airports are designed for larger passenger aircraft that are higher off the ground. When a small aircraft utilizes these jet bridges they must use a "ramp" to bridge the gap between the jet bridge and the aircraft. 

According to the same Circular, 


  The maximum horizontal gap allowable along the path to the aircraft can be no
  greater than 1.25 in (32 mm)


So, I guess that a 4 inch gap is not allowed.