Of course you are right that traditionally the Epistle of James is attributed to James the Just, not James the son of Zebedee or James the son of Alphaeus. (The writer of the epistle simply calls himself James, with no other identification.) My mistake.
Whoever wrote it, I see nothing wrong with the Epistle of James.
You are not entirely mistaken ... Paul referred to James and Peter and may have attributed ‘apostle’ to James in that letter, but James was not a traditionally acknowledged Apostle as one fitting the definition Peter used when Matthias was selected to replace Judas.