It is also worth mentioning that you can avoid explicitly imposing the SOC constraint, and (as of LTS 2023.03) PROC OPTMODEL will automatically transform to conic form:

%let n = 7;
%let k = 2;
proc optmodel;
* define the sample points ;
num samples{1..&n, 1..&k} = [0 0, 2 0, 1 1, 1 3, 0 2, 3 2, 5 3 ];

var x, y; * let (x, y) be the geometric median ;
minimize f = sum{i in 1..&n} sqrt((x-samples[i,1])^2+(y-samples[i,2])^2); * minimize the sum of distances ;

solve with conic;
print x y; * print the optimal solution ;
quit;

The same approach works for the weighted version:

%let n = 7;
%let k = 2;
proc optmodel;
* define the sample points ;
num samples{1..&n, 1..&k} = [0 0, 2 0, 1 1, 1 3, 0 2, 3 2, 5 3 ];
num wt{1..&n} = [1,1,1,2,1,2,2];

var x, y; * let (x, y) be the geometric median ;
minimize f = sum{i in 1..&n} wt[i]*sqrt((x-samples[i,1])^2+(y-samples[i,2])^2); * minimize the sum of distances ;

solve with conic;
print x y; * print the optimal solution ;
quit;