OK, re-reading your question, it seems you just want a current source you can adjust with a knob. That is to say, the output should be a current which remains constant regardless of the voltage of the input that it's attached to (within some range)... and you get to adjust that constant current.
So what you need is an adjustable current source, which could be obtained as a chip as Gustavo notes, but it is easy to make from a couple of transistors and resistors, in the form of a "current mirror". See the schematic here: http://analoglib.net/2010-10-12/bilotti-jssc-75-june-noise-characteristics-of-current-mirror/
The transistors can be any small NPNs like 2N3904 or 2N2222, or if you want the output current to flow the other way, flip the schematic upside down (ground becomes V+) and use PNP transistors like 2N3906.
The idea is that you set the current at Ii (your Ii can be implemented via a variable resistor "Ri" to V+, say +12V), and the circuit will draw that same current into the collector of Q2. Calcs:
Assume V+ of 12V
Choose RE = 50 ohm (as a starting guess).
20mA: Voltage drop across RE + Q1 VBE = 20mA * 50ohm + 0.7 = 1.7V.
We want Ri to drop 12-1.7V at 20mA, so Ri = 10.3V/20mA ~= 510 ohm.
4mA: Voltage across RE + Q1 VBE = 4mA * 50ohm + 0.7 = 0.9V
We want Ri to drop 12-0.9V at 4mA, so Ri = 11.1V/4mA ~= 2.8k.
So a 2.5k pot in series with say 450 ohms would be a suitable resistance for the Ii leg, assuming 12V. Obviously you can calculate different numbers if you want to use a different V+, or larger or smaller RE values.
In the example where current flows into Q2 C, the range of voltages accomodated at Q2C will be from some high number that the transistor can withstand (say 40V), down to approximately the 1.7V calculated aboy, minus perhaps 0.4V -- so about 1.3V. If you need a lower range of voltages, substitute say -12V where ground is in the schematic shown here.
The upside down version with PNP transistors and a +12V rail follows the same logic -- highest voltage would be 12V - 1.3V = 10.7V, down to 12V - 40V = -28V.
Beware that you will often see current mirror circuits drawn without RE, that is to say, with the emitter connected to the rail (here ground). That is fine in an IC where Q1 and Q2 can be well matched. But using unmatched individual transistors the REs allow for some mismatch between the transistors -- the circuit no longer relies on a precise match of the VBE vs IC characteristics of the transistors.
Hope that helps.