Comparing the two engines... J79 was never produced in a non-afterburning military version, and U-2 was not fitted with afterburner
The military J79 was never fitted in a non-supersonic aircraft (there were later civilian non-A/B versions in small executive jets).
J57 was produced in more than 9 military non-A/B versions (as well as at least 13 A/B versions), and fitted in several subsonic military jets (A-3 Skywarrior, B-57D Canberra, B-52 A-G models).
The J57 was also more powerful in the 1950s:
J79-3 (mid-1950s F-104) 9,600 lb. static thrust
J57-37 (U-2 1955 first flight) 10,500 lb.s.t.
By 1958 the J79 was still 500+ lb.s.t. below the J57 (the U-2 had been upgraded to the 11,200 lb.s.t. J57-31), meaning the J57 was the better choice for total thrust... and the U-2 was slow-accelerating, so it needed all the thrust it could get.
I don't see mention of water-injection for the U-2, but the B-52F in 1957 got an extra 2,550 pounds of take-off thrust using this technique (11,200 lb.s.t. dry, 13,750 lb.s.t. W/I)... and the J-79 was never fitted with this equipment.