There are several difficulties that would prevent Japan from having a similar history to India, and vice versa. The Indian subcontinent is home to surprising amounts of cultural diversity, even more so in ancient times (which is where the POD would have to be). This is because it's large, and has had multiple incursions over the years by various ethnic and religious groups. In comparison, Japan was, for quite a long time, a semi - united feudal state in which internal conflicts were forged more by dynastic disputes rather than cultural differences.
So, in order to make Japan become more like India, your best bet is to butterfly the formation of the Empire entirely and have more successful Ainu. Then, balkanize the Ainu and Early Japanese,and have a Chinese attempt to take Japan (which could only happen if China decides that Japan is a better prize than Southeast Asia, for some reason, and has the military and naval power to enforce a occupation of Japan). China then needs to hold Japan for long enough that it forms decent sized legalist/confucian/buddhist populations in parts of Japan. When the strong, Japan-conquering Chinese dynasty inevitably falls into a civil war or three, have Japan break off into multiple small states divided along religious and cultural lines, possibly with the inclusion of some leftover Chinese aristocrats who either assimilate into local culture or form some sort of melting pot Sino-Japanese culture. Then, have future Chinese/Mongol/Russian invasions to replace the Muslim invasions of modern day Pakistan and the Indus River Valley. As for a colonial power, that is tougher. Japan has little in the way of natural resources to be attractive to European Empire-builders, so the only thing I can think of is if Japan is somehow the agressor, which is unlikely unless it's fragmented states have somehow united into two or three more cohesive entities capable of bothering a colonial power in some fashion. Perhaps an attempt to stop Ainu/Japanese piracy in the China Sea, or simply a futile attempt to grab more asian land as other, stronger powers have claimed more lucrative colonies or the invader already has most of the lucrative colonies and is just greedy for more land, (maybe for a convenient place to station a navy to attack China's coast). Then, have a future independence movement end up in the creation of two countries, an Ainu based one and a Japanese based one, much like Pakistan and India.
As for India, I have no clue how to get it to have dynastic struggles similar to that of Japan, so you'd have to ask someone with more expertise in that area.