I don't think Confucius ever said this. I read the Analects recently and it wouldn't even make sense.
https://quoteinvestigator.com/2014/09/02/job-love/
Confucius's advice was for sages and rulers, and a big part of his ideas was fulfilling your role dutifully, whatever it was.