"Nano" or "Nano Every"?
Ahhh, "Nano BLE".
PORTD is just for the '328-based I/O boards.
The NanoBLE uses a different scheme, P0. and P1. and so on, and they may not have figured 'port manipulation' in the mix.
https://content.arduino.cc/assets/Nano_BLE_MCU-nRF52840_PS_v1.1.pdf