All that was figured out following a print scan on a photo, which only happened after a desperate Gibbs had to reveal that he murdered Pedro Hernandez long ago.
In a very Gibbs way, the leader quickly told Bishop, Torres, and McGee (who isn’t going anywhere) the vigilante judge’s other motive for going after him.
With Gibbs closing in on him, Deacon put out a hit and used the recently disgraced Mallory (ex-girlfriend of Vance) to carry out the deed.