My question is similar to this How to find nearest point for each point in current layer using ArcGIS Desktop? But I am looking to use arcgis network analyst. I tried using the origin destination matrix and used the same layer for both origins and destinations but I got the nearest point being itself.