Radio galaxies in the Sloan Digital Sky Survey: spectral index–environment correlations