Which engine should I use?

There are several viable alternatives for doing the turbo swap into the 4000q:

By far the most popular engine used on the 4000q turbo conversion is the 1986-89.5 turbo/quattro "MC" engines due to their large availability, longevity, and performance potential.  The TQC/Ur-Quattro engines are rare and expensive, plus they don't have the modern management systems incorporating knock sensors that can save the engine from destructive detonation.

The early 1980-85 turbo engines also lack the modern management systems, but the 1984-1985 cars had a different intake manifold virtually identical to that on the TQC, which could make the swap less painful.  The 1986-89.5 and the 1989.5-91 10v turbo engines are virtually identical with the exception of the somewhat higher compression ration on the later examples, which ultimately limit their performance potential at the expense of improved driveability.  They also have water cooled turbos for much improved longevity.

20v engines are very expensive and are not as plentiful as 10v turbo engines, but  is the way to go if you want really high power, have deep pockets, and are prepared to do some creative custom work.  If you can find the engine, it could easily run you $4000 (how's that for a coincidence?!).  According to Ned Ritchie from Intended Acceleration, putting the 20v 3B engine on the 4kq can be in some areas actually simpler than putting in an 10v engine.  If the battery is small enough, it can be kept in its stock location and the TQC tie rod would not be nessesary.  There are still some issues like oil pans and power steering pump that should be addressed, but it would really be the ultimate 4kq turbo car!