You haven't said if your D23 is manual or automatic.
For a manual ... if it's not setting it's probably the neutral position switch (NPS). I'm pretty sure the D40 and D23 are the same when it comes to the NPS in that the SET is turned off (contacts are closed) when the transmission is in neutral. When the transmission is in a gear the NPS contacts are open. Therefore a quick test is to find your NPS and unplug it from the connector which makes the CC system think the transmission is in gear so the CC should SET.
https://navarapart.com.au/product/genuine-nissan-navara-np300-neutral-position-switch
The switch is screwed into the drivers (right hand) side of the gearbox, and is the switch closer to the rear of the gearbox.
Not to be mistaken with the reverse switch which is located in front of this switch, and has a different plug.
If it is the NPS you can do this to save some money otherwise buy a new NPS.