The penetration of electric vehicles and renewable resources as highly influenced components in global warming and greenhouse gasses emission has increased in recent years. This paper determines the optimal allocation of battery charging and swapping stations integrated with wind and solar units to minimize total cost and voltage deviation based on a long-term expansion planning. According to the presence of uncertain parameters and in order to simulate realistic conditions, a scenario generation/reduction approach is also performed to model the fluctuations of wind speed, solar radiation, electrical loads, incoming vehicles and market price. As well, a time-of-use strategy is implemented to show the impact of flexible loads on objective functions. It is noteworthy that simulations are implemented on a real distribution network with actual geographical data. The results for the proposed model in the deterministic state show an improvement equal to 283.33 % for the voltage deviation, while a profit equal to 2.2 million dollars per model lifetime is achieved. The uncertainties deteriorate the voltage deviation by 12.12 %, in return, the profit is increased by 8.63 %. It is also concluded that responsive loads increase the profit and enhance the voltage deviation by 7.94 % and 6.3 %, respectively.