Optimal H∞ general distance problem with degree constraint