It would help to show the code you tried to use to kill all the threads because it matters where you are trying to kill the threads from in relation to the forked threads.
Most likely you can use the disable fork construct which kills all the child threads of the current thread.
begin
for (int j=0; j<3; j++) begin
fork :fork_name
automatic int k = j; // Make copy of index
task_name(k); // Print copy
join_none
...
disable fork;
end
You have to be careful using this construct because the disable fork construct kills ALL threads that are children of the current thread, not just the threads created by the previous fork statement.