EMC considerations for driving a solenoid via PWM over a long cable
The solenoid doesn't care if you supply it PWM or a clean analogue voltage so you could use an LC low pass filter to "convert" PWM to a smoother DC value. Values depend on dynamic expectations of your solenoid and PWM frequency. Fit it at the driving end of the cable to reduce EM emissions on the cable.

Note that using a twisted pair won't eliminate e-fields being generated by the cable because it is not a balanced output drive due to one wire being 0V. Add a screen or use coax for better results.