Is there a name for this?
Here is a straightforward implementation. For larger datasets, it'd probably pay to write a smarter algorithm than an exhaustive search:
K = 5; S = {1, 2, 3, 6, 7, 9, 11, 22, 44, 50};
subsets = Subsets[S, {K}];
myMetric[subset_] := Total[Abs[# - First@Nearest[subset, #]]& /@ S]
MinimalBy[{#, myMetric[#]} & /@ subsets, Last]
{{{2, 7, 22, 44, 50}, 9}, {{2, 9, 22, 44, 50}, 9}}