On a ducted propeller, how does duct length affect thrust?
Generally, there are losses due to friction drag in any tube carrying a fluid; therefore, the longer the duct, the more energy is lost from the air stream (this loss appears as back pressure against the fan, so the same power is absorbed at the reduced flow rate).

The higher the flow velocity, the greater these losses, but in a high bypass turbofan, there are other considerations.  Extending the bypass duct past the engine core allows the cool, relatively slow bypass air to mix with the hot, high velocity turbine exhaust, with the main effect of reducing exhaust noise.  The loss with a duct 2-3 meters long rather than half a meter is small; the gain in noise reduction can be large, and mixing the bypass exhaust with the turbine exhaust inside the duct may also give enough augmentation effect to offset the duct losses.