High energy resolution X-ray absorption spectroscopy study of uranium in varying valence states