JAG is military. Unless the client was himself military, facing the military code of justice, that the public defender accepted a position with the JAG is irrelevant, since there is no conflict, real or theoretical, between the JAG role and a (civilian) public defender role.