The Energy Department loan would finance the California utility’s efforts to upgrade the power grid and reduce emissions.