You are correct in that this being is not an entirely Japanese creation.
According to the Japanese Buddhist Statuary page about this creature, its actual origin is unknown, suggesting that it has its origins in foreign myths:
Probably derived from the ancient Vedic sea monster known (in Sanskrit) as Makara. Also possibly derived from a type of Chinese temple-roof ornament known in Japan as Shibi 鴟尾
The frequent use as roof ornaments occurred in the Edo era, and it was believed that the
The creatures are thought to provide protection against fire, as they are attributed with the power to control rain.
An interesting perspective of the origins of the Shachihoko comes from the blog article The twin fish, state symbol of Uttar Pradesh and commonly found on ancient buildings of Ayodhya, is the biggest clue to the link and the route undertaken by Kaya (Kara/Gaya) royals to Korea (and Japan), that a cultural/mythological route between India and Korea and then to Japan.
In the Nippon.com blog article Real Animals and Mythical Counterparts, states that the kanji for shachi (an abbreviated form of shachihoko) shares the same kanji for an orca or killer whale - although it is not clear which influence which. However, the writers suggest another link in that the orca
venerated by the Ainu and other northern peoples and credited with supernatural powers similar to those of the weather-controlling fabulous beast