If you have the Network Analyst extension, you can build your line features as a network dataset. Then, using Network Analyst, you can create an Origin-Destination (OD) analysis layer and load your points as both origins and destinations. Solving this analysis layer will provide you with a complete matrix of shortest path costs between your points, based on your underlying network dataset costs.
If you are not familiar with how to do this, then I would encourage you to read through the Network Analyst tutorial and work through its exercises. This will show you how to build network datasets and run analysis on them.