It is possible that Kerry's file had a "political flag" on it due to his family's relationship with the Kennedys. If it did, Z would have been briefed on K's assignment. This may be one of the reasons that K refuses to release his Navy files.
It is possible that K was given preferential treatment in obtaining the swift boat assignment, because of high level connections.
It is possible that K came to Z's attention because of his being in the swift boats, and the swift boats having such a high profile mission. Since K volunteered, and he was on a volunteer 2d tour, and he was a Yalie, and he was politically connected... I think it is possible.