Growing energy demand in the distributed energy system (DES) besides new charging loads of electric vehicles (EVs) make DES infrastructure unavailable earlier than normal projections. DES lines need to be upgraded to carry the modern demand of customers. DES line upgrade (LU) cost minimized and deferred to the next years by using energy storage system (ESS). ESS offers the opportunity to use energy flexibly in the distribution grid. It is possible to use ESS to shift the inevitable upgrade costs of the distribution grid elements and increase the power quality of the distribution grid. In this study, a method is proposed to extend the lifespan of DES with ESS and reduce line upgrade and investment costs in the distribution system. For this purpose, the IEEE 33 bus test grid is used, and the proposed method is tested and analyzed with different case studies. According to the results, the proposed method can reduce the investment cost by up to 80%. Besides, ESS usage considering load increase and line conditions of the distribution grid, upgrade costs of distribution grid are shifted, resulting in an optimal dimensioning and positioning while extending the lifespan of the distribution grid elements and, at the same time, offering significant improvements in energy quality. Additionally, it is seen that the power losses of the distribution grid are reduced up to 26%, and the voltage profile of buses is improved with the usage of ESS.