Antony Munro died in the accident between Auldgirth and Thornhill on Monday.
He was driving a Volkswagen Golf which was in collision with an Iveco lorry being driven by a 53-year-old man from Cumbernauld.
The lorry driver was unhurt. Crash investigations are continuing.
Police said the procurator fiscal had been informed.
Insp Campbell Moffat said: "We are still appealing for any witnesses to this crash to get in touch with us at Dumfries through 101."
Police have named a 29-year-old Glasgow man who died in a crash involving a car and a lorry on the A76 in Dumfries and Galloway.