Unfortunately, you have chosen a flawed translation and presented an incomplete statement. If you read the next several versus and check the Greek (39 Ἐραυνᾶτε τὰς γραφάς, ὅτι ὑμεῖς δοκεῖτε ἐν αὐταῖς ζωὴν αἰώνιον ἔχειν· καὶ ἐκεῖναί εἰσιν αἱ μαρτυροῦσαι περὶ ἐμοῦ) you will see that Jesus is actually admonishing the Jews for citing Scripture rather than accepting His teachings.
Wow!Do you have that wrong. The Jews prided themselves for being faithful to Moses and his writings. Jesus points out how they were in fact unfaithful to Moses and his writings because Moses foretold of Jesus coming.
46 For had ye believed Moses, ye would have believed me: for he wrote of me. 47 But if ye believe not his writings, how shall ye believe my words?
Jesus and Scriptures were never in contradiction.