In the Matthew passage, Peter and Andrew are together fishing. In the John passage, Andrew was with John the Baptist and Peter was else where?
I don't see an inherent conflict between these passages. Specifically, the John passage describes how both Andrew and Simon initially met Jesus; the Matthew passage describes how He called them as disciples. Matthew never claims that the event by the seashore was Jesus' first encounter with the brothers.