Inserting multiple columns
We insert rows, not columns, in a table.

You need a query that returns both results, combined in 3 rows. Assuming that the term2_id values should match:

INSERT INTO temp_table
  (dist0, dist1)
SELECT 
  min(term1) FILTER (WHERE distance = 0),
  min(term1) FILTER (WHERE distance = 1)
FROM graph_path
WHERE distance IN (0, 1)
GROUP BY term2_id
ORDER BY term2_id ;