Hi faziya
Please refer jumper settings of below photo. Make sure your EVK board jumper settings are the same.

Then test it with latest MCUXpresso IDE 11.7 +SDK v12.3.x
If SDK and IDE versions don't match, connection error may occur.
If still fail to connect, use LPCScrypt to update on board debugger firmware, you may try both Jlink and CMSIS DAP interface.
https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mc...
Hope this helps,
Jun Zhang