Seems like Lucas’s Jedi Knights draw inspiration varied sources. To name but a few of the possible sources: from Buddhist monks like the (fictional?) Shaolin , from the samurai or feudal Japan, and perhaps a smidge from European knights of the Middle Ages.
Taken individually, any of the three would fall short in a direct comparison of their role in real-life society versus the role of the Jedi Knights in Lucas’s “Star Wars” society. For instance, the Shaolin would presumably be wise and religious, but they wouldn’t be patrolling the countryside for an opportunity to wail on evildoers. My impression is that the landed samurai, quite frankly, were somewhat malevolent … and didn’t necessarily work to keep peace for the greater good (just for their own). I’m not sure if European knights were as hard on the peasants as samurai seem to have been (code of chivalry and all), but I’m also not sure if they were necessarily the sages/protectors of their communties, either.
This is not a bad little question you’ve thrown out.