How to vary the voltage of a battery
5V/1300Ω is 3.8 milliamps, if your characterization of the load is correct. At 5 volts that would be 19 mW

If the load is not a simple resistor, and you "measured it with a meter set to Ohms" that number is meaningless, and you need to measure actual load current at 5V with an ammeter (or use a voltmeter and measure the voltage across a 1 ohm or 0.1 ohm or 0.01 ohm resistor - which is pretty much what an ammeter does.)

Many potentiometers should have been fine feeding a load at 4 milliamps/2 hundreths of a watt, if the potentiometer was hooked up appropriately - lacking detail of how you did that and what your now smoked potentiometer was, I'm suspecting the load draws quite a bit more current, or you hooked the potentiometer up in a way (and it was of a value) that might lead to smoke release regardless.

Depending on your constraints and use, a simple linear regulator may be the easiest and cheapest approach - it's not efficient, but if this is just for testing that may not matter much. AN LM317 or TLV431 might work, depending on actual load current required.

Finally, a varying voltage with full current supply ability (as from a regulated battery) is a poor model for a solar cell and varying light intensity. If you really want to test how a circuit works with a solar cell and varying light intensity, attach a solar cell, and depending on time and budget constraints, either take it out on a sunny day and shade it variably, or shine some bright lights on it and vary the distance from the lights.