What prevents miltiary jets and turbo-props from being refitted with a turbofan?
Anti-submarine and maritime surveillance aircraft (such as the turboprop P-3 Orion) typically fly slower and lower than the 100+ passenger jetliners.

For those speeds and altitudes, a turboprop is more economical. So there is no need that would push such a massive undertaking to retrofit an airplane.

See: Which engine is more efficient between turboprop vs jet?

That aside, let's say you have bought a P-3 Orion and you wish to retrofit it with turbofans.


High-bypass turbofans are wide, ideal position would be under the wings where the current engines are. Since they are big and the current engines are mounted mid-wing, there will be no engine—ground clearance.
Raise the landing gear, this is extremely difficult to accomplish. It's easier to build an entirely new aircraft. If it was easy, Boeing would have done it for the 737 Classic, 737NG, and 737 MAX (three opportunities).
The current engine cowls are an integral part of the wings, so new wings will be needed.
Loss of efficiency with same fuel carrying capacity means degraded range and endurance.
New cockpit instruments and controls will be needed. Almost a complete overhaul for the avionics. Which for the flying equipment (non-military equipment), costs in the neighborhood of 30% of the total aircraft cost (not taking into account the required R&amp;D).
New electrical system, new pneumatic system, etc. Basically any system the current engines power, needs to be re-engineered.




For turbojets (and low-bypass turbofans) it's not easy, but much easier than turboprops. It has been done for the Boeing KC-135 Stratotanker for example (and to the DC-8 on the civilian side). And it's been discussed numerous times for the B-52.

Here since the speeds and altitudes are almost the same, there is now a gain in fuel efficiency (as long as we are not talking about supersonic aircraft).



Before the advent of the commercial jet age, converting a piston airplane to a jet airplane for the purposes of engineering validation was done. Such example from 1950 is the Avro Tudor 8:


(Source: Flight)