I dont think its so much wanting to go renewable power but more so the metrics are forcing it to look this way;
Chile
Gas - cheap capex but mostly imported and expensive fuel cost Coal - ditto Nuclear - expensive, unpopular and long lead time Hydro - available, some nimby issues Solar/Wind - available, expensive, not baseload Shallow Geothermal - available and baseload, more expensive capex compared to coal/gas but low opex and can be closer to remote mines than coastal installations at some locations. Neighbours - moderately unfriendly regarding power and water exports to chile.
Peru could be somewhat similar but not as critical as Chile with increase in gdp output and mining production.