The only thing I see wrong with the original powersupply circuit is possibly the value of R2. It is specified as 240 ohms. The National Semiconductor data book that I have specifies for the LM338 to use 120 ohms.
I have built numerous powersupplies with the LM338K and used 120 ohms instead of the 240 ohms. Instead of the ceramic capacitors on the output I generally use a 1 to 2.2 uf tantalum capacitor.
Replacing the LM338 with a LM317 should work fine with a 240 ohm resistor and a 4700 uf filter. However with no load the voltage on the input(across the filter capacitor will be very close to 33 volts. (secondary rms x 1.414). When you put a 1A load the voltage across the filter capacitor may be very close to the 24 volt rms secondary voltage.
I can see no reason why the 5K pot is burning up. Have you monitored the output voltage when you first connect the motor. The motor may have a high surge current. But if the regulator is on a adaquate heatsink it should be okey as the LM317 has built in current limit and power dissipation shut down.
DC motors tend to create a lot of noise on the DC line so a bigger capacitor on the output terminals, may be necessary to suppresss which could be causing problems for the regulator. With a larger capacitor on the output it is necessary to connect a diode from the output terminal back to the input terminal of the regulator. The anode goes on the output and the cathode on the input. A one amp diode should be okey.