I've noticed that most Japanese swords are either a longer or shorter variation on the Katana. Why did such a uniform design emerge?
There's no real functional reason for the general uniformity. Therefore: fashion.
First, similar uniformity can be seen in other places. For example, throughout the entire Medieval period in Europe, we see that most swords are longer or shorter variations on the spatha or Viking sword or knightly sword AKA arming sword (there were other types in use alongside them, but "most" is accurate). In western Asia, we also see a range of straight double-edged swords from late Antiquity through to the later Medieval period. In much of continental SE Asia, we see a range of swords similar to the Thai/Burmese/Cambodian/Laotian dha.
The Japanese "katana-like" swords varied from knives through to large two-handed swords, from light to heavy, from straight to quite curved. Things like size, weight, and balance matter a lot. The basic "katana" design allowed a lot of variation of those things - what else is needed? If one can cut with, and thrust with it, it will do its job.
Two things contribute to uniformity of swords, both of which apply to Japan:
The battlefield tends to be dominated by spears and other polearms, and bows or guns. Swords might be very common, but are often sidearms.
Cultural uniformity. Swords are often important markers of status and of belonging to a particular culture.
If a Japanese samurai of the 15th century somehow acquired a European knightly sword, it would have served his needs functionally. After all, he could thrust with it, and cut with it. It would also mark him as "the samurai who has a funny foreign sword". Sometimes, adopting a foreign weapon can be a status symbol. Sometimes, it would just mark one as odd. Being eccentric is not usually considered good in Japan.
In some highly multi-ethnic regions, we can see a very diverse variety of swords in use. For example, in the Philippines in the late 19th century, some of the variety of swords included:
https://www.britishmuseum.org/collection/object/A_As1894-505-a
https://www.britishmuseum.org/collection/object/A_As1906-1217-1
https://www.britishmuseum.org/collection/object/A_As1923-0410-2-a
https://www.britishmuseum.org/collection/object/A_As1914-0414-70-a
https://www.britishmuseum.org/collection/object/A_As1914-0414-71-a
Another multi-ethnic region with diverse swords is the Congo basin:
In both of these cases, the swords function partly as markers showing culture or ethnicity. The multi-cultural environment appears to promote a diversity of sword forms. Within any given ethnic group or people, it would be unusual to see a foreign type of sword in use.
If we recall that Japan is multi-ethnic too, we can look for more variation among "Japanese" swords by looking at those of other ethnic groups, such as the Ainu:
We see quite clear stylistic differences. The blades on Ainu swords are often typical Japanese blade, but the mountings are in a distinctive Ainu style.