Punishment, as we see it, is a legal issue, and legality doesn't concern how one thinks and remembers, only what one has done, and the original Jack was the one to commit the crime, not Mark. So Jack should be punished and not Mark.
Ignoring legality however and simply looking at morals, it concerns possibility with reality. Mark now thinks like a killer and it is reasonable to claim his propensity to kill is much greater, however he has yet to do so. Jack on the other hand thinks and remembers identically, but has actually murdered someone. Clearly, as you stated, Jack ought to be punished. But what of Mark and his possibility?
This reminds me of a certain philosophical perspective on personhood and abortion. Essentially it goes that personhood is attained via acquiring a personality, a set of desires and hobbies-unique, personable things specific to you. If you are pro abortion, you value the woman's life more because she is a person with a developed life and personality, whereas the fetus is not a person because it has not been given any experience or life as to develop this. If you are against abortion, then you value the life of the fetus more, because while you recognize the personhood of the woman, you consider the fetus to be equally a person because, if born, it will develop a personality with desires and hobbies. Therefore the fetus's potential personhood is equal to the woman's developed and remaining potential personhood, and to harm the woman then is less severe than to kill the fetus.
Considering that analogy and the case at hand, there is no definitive answer, it's simply where you place your morality- on the actual, or what may be the actual. However, I would argue you ought to place your morality on the actual. The potential actual is an abstraction, a probabilistic reality that is not grounded or certain. There is nothing more real than the actual, so the potential actual must be less real, by definition. This does however assume it is one or the other; there certainly exists the case where you may value one more than the other, but it's not only the actual or only the potential actual. This is the most realistic case really, in such Jack ought to be punished and Mark ought to be as well, but to a lesser degree and possibly a different form (rehabilitation, therapy, surgery to reverse altered neurons, etc).