High penetration of renewable resources on modern distribution networks increases the net load variability in due to the uncertain nature of these resources. Hence, the system may suffer from high ramping problem, the ignorance of which leads to the power interruption. Controlling the net load variability to provide adequate ramping also increases the operation costs significantly. Therefore, a new solution should be implemented to handle this problem. The aim of this study is to incorporate the flexibility indices into the expansion planning of distributed energy resources in modern distribution networks in order to demonstrate how optimal arrangement of flexible resources results in reducing the operation cost while controlling the net load variability. To this end, the benders decomposition approach was applied to the proposed expansion planning to reduce the complexity of the problem to a level which can be solved. The uncertainty of clean resources, load consumption and electricity market price was considered in the proposed problem along with the limitations of the investment budget and carbon emission permits. The simulation process was carried out on the IEEE 69-bus test system. The results indicate that optimal placement of the flexible resources considering the flexibility constraints is profitable from both technical and economic perspectives. Cost exp inv total investment cost