Several things to consider. The Greek grammar of nouns and adjectives depends on cases. Position can have emphasis, but doesn't determine such things as subject, object, etc., while position in English does. Second, the context to the previous verse is important. Third, when ἄνθρωπος is singular, it often means mankind.
Figure 1. How ἄνθρωπος is translated in the Septuagint (LXX) (generated with Logos Bible Software)
Thus, a better translation of:
24 αὐτὸς δὲ ⸀Ἰησοῦς οὐκ ἐπίστευεν ⸁αὐτὸν αὐτοῖς διὰ τὸ αὐτὸν γινώσκειν πάντας 25 καὶ ὅτι οὐ χρείαν εἶχεν ἵνα τις μαρτυρήσῃ περὶ τοῦ ἀνθρώπου·* αὐτὸς γὰρ ἐγίνωσκεν τί ἦν ἐν τῷ ἀνθρώπῳ. (John 2:24–25, NA28)
But Jesus himself did not entrust himself to them, because he knew everything, and because he had no need that someone should testify about mankind. For he himself knew what was in a human being.
Thus, in a sense the answer to your question is yes and both. "He knew everything" emphasizes Jesus' deity, but this passage also emphasizes Jesus' humanity. In the Hebrew mind, know can mean to be acquainted with. The language in this passage is experiential, ἐπίστευεν in particular, which is the verb often translated believe in John.