Yes. Index options are cash settled, so upon expiry, the ITM option will be settled at the intrinsic value (Spot Price - Strike Price if you’re holding Call Option and Strike Price - Spot Price if you’re holding Put option).
The net P&L you will make will be the difference between your buying price and settlement price. More: What happens if I don't square off my positions in options? - #2 by ShubhS9