@da97ed
Ah.. Duet 2 not Duet 3... Seeing 3s everywhere in the question, it appeared to be a Duet 3.

The expansion connector is only low level logic signals and not capable of controlling any heater or fan directly, without a Duex connected to handle the higher voltage and current control needed..

I gave the answer to suit a dedicated heater output port, as did Phaedrux; there was unfortunately no clue in the question that your board did not have one.

(The Duets I've used do have the heater 3 power connector onboard, as per the circuit fragment, so again no clue of anything different).