Just make that variable the last line in the function, something like this:
Names default to here(1);
myfunction = function( {},
dt = Open("$Sample_data/iris.jmp");
NS = New Namespace();
col = {};
col[1] = column(dt, "Sepal Length");
col[2] = column(dt, "Sepal Width");
col[3] = column(dt, "Petal Width");
// if you have JMP 16:
coldata1 = transform each ({c}, col, c << GetasMatrix());
// JMP 15 and older:
coldata2 = {};
for(i=1, i<=n items(col), i++,
coldata2[i] = col[i] << GetasMatrix()
);
// Either way you get the same result:
Show(coldata1 == coldata2);
// Return the list of lists:
coldata1
);
show(myfunction());