You are specifying incorrect generic arguments. You are saying that TSource is string, when in reality it is a KeyValuePair.
This one is correct:
sortedDict.ToDictionary<KeyValuePair<string, int>, string, int>(pair => pair.Key, pair => pair.Value);
with short version being:
sortedDict.ToDictionary(pair => pair.Key, pair => pair.Value);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…