The book of Acts says that James of Zebedee was killed by Herod Agrippa, but does not say why. There is nothing about a trial or a Roman soldier. The story you are referencing come from Eusebius, who cites a lost work of Clement of Alexandria:
- And concerning this James, Clement, in the seventh book of his Hypotyposes, relates a story which is worthy of mention; telling it as he received it from those who had lived before him. He says that the one who led James to the judgment-seat, when he saw him bearing his testimony, was moved, and confessed that he was himself also a Christian.
- They were both therefore, he says, led away together; and on the way he begged James to forgive him. And he, after considering a little, said, "Peace be with you," and kissed him. And thus they were both beheaded at the same time. (Church History II.9)
Eusebius was writing in the 4th Century and quoting a writer who was active in the late 2nd to early 3rd Century. There is no non-Christian confirmation for this story, or for anything about James of Zebedee at all. We have no non-Christian information about any of the disciples. We know nothing about how or when or why any of them died. James of Zebedee is the only disciple whose death is mentioned in the New Testament, but that tells us very little.
As to the tradition mentioned by Clement of Alexandria (who should not be confused with the earlier Clement of Rome), it might be worth mentioning that Clement of Alexandria also said that Cephas and Peter were different people, so the credibility of the source is not unimpeachable (either that or we have to radically change the way we read Paul's letters).