It is best to give the air in the filter housing somewhere to go. When you change the filter, you can clean the area around the 1/8" pipe plug on the top toward the inside of early 24 valve engine fuel filter housings and loosen the plug, or leave the top loose on later 24 valves and Third Generation engines. When fuel starts coming out from priming the engine with the electric lift pump, tighten and then start the engine.
In your case, the air probably went into the injection pump and is making the truck hard to start. Long cranking eventually works (but not over 30 seconds at a time so the starter doesn't overheat). Or, loosen the injection lines at the head (19 mm or 3/4" open end wrench) that you can get to, crank until fuel comes out them, tighten, and start the engine.