I’m wondering if a massive planet (maybe 10 times the mass of Jupiter) in the habitable zone of a G type star could have an axial tilt similar to earth or if gravitational forces would erode the tilt the way they do to moons orbiting gas giants?
Yes, planets with an extreme tilt can happen, but we cannot be sure about the probability of that by now. Our own planet Uranus is witness to this that it does, though (even when it is significantly lighter than Jupiter).
Despite our knowledge of over 5000 exoplanets to date, we know little for sure about their spin-orbit alignment or their alignment relative to their host star's rotation axis. There have only recently been reported measurements of the spin-orbit alignment from the Beta Pictoris system (Kraus et al, 2020) which confirms that the planets in this emerging planetary system are spin-orbit aligned wrt their host star. There is another slightly older overview by Campante et al (2016) which confirms this for other systems. However defining the exact obliquity for the planets is even more difficult as it needs well-resolved spatial spectroscopy at levels of quite a bit better than 1AU in the target system of evolving planets (thus those which still have a circum-planetary accretion disc) - or you need to resolve the planet which is beyond our current capability.
There is a probability modelling analysis by Monoz and Perez (2018) which comes to a similar conclusion: all tilts possible, but spin-orbit aligned planets are more likely (how much depends on model assumptions).
As to'erosion'of axial tilt: the sun did not succeed in changing much venus' (177°) or earth's (23°) axial tilt, so it won't impact that of a much larger planet either.