Uncertainty Aware Learning for Language Model Alignment