Especially in its early history, Japan was heavily influenced by China. For example, the most important part of the Japanese writing system was imported from China even though it was not well-suited for writing the Japanese language. Even so, Japan never became a part of China -- it was never conquered by China.
The best explanation for this is that Japan is relatively far from the Asian mainland. Korea and Vietnam, for example, were conquered by China, but Japan's separation from the mainland made invasion difficult. To get a sense for why this would be, think about the fact that England is 21 miles from the continent at the Straits of Dover. Even this has made it hard to invade England. Japan, by contrast, is about 115 miles from Korea across the Straits of Tsushima.
Therefore, invasion of Japan was very difficult and China never managed it even though the Mongols did try it twice in the late 1200s under Kublai Khan.