Marc Marquez claimed victory at the Japanese MotoGP in Motegi, slashing Jorge Martin's championship lead down to just two points with six races remaining.