You can enjoy what you do most of the time though. Thanks to your brain also. I find it harder when working for somebody because money is not necessarily a good enough motivator. But when working on my own project and faced with a tedious task (writing tests, fighting dependencies or whatever it is that you despise), I think why do I want to do it (e.g. I want my project to succeed it and it needs it). You can try to achieve your goal without the thing that you don't like. If you think that this is not possible, then wanting your project to succeed and wanting to do this task are the same thing. They are connected.
Once you realize this it makes things much more simple. Most of suffering seems to come from some semi-conscious story in your brain: I want A but without doing B. Either it's possible to do that or it's not. If it's not then it's just wishful thinking that is only bringing you misery.
The way you think and wire your brain really matters. Instead of "I must do X even though I don't want it". Think "If I want A then X comes with it - do I still want A?". Or find a way to A without X.
For me at least, having that stated explicitly in my mind alters my perception of X. Because it really is hard to hold two logically inconsistent beliefs in your mind when you bring them both into focus. Your brain quick fix is usually some "but..". That's where you need to eliminate wishful thinking. Wishful thinking is imagining reality in some other way than it really is and only leads to frustration.
Accepting things that already are should come pretty naturally though. You may want to change something. But you can't change the past.
But you're coming at it from a different angle, I feel. Instead of "finding your passion", I hear you advising a different way of looking at it such that one can find fulfillment (for lack of better phrasing) in whatever job by matching the story in one's head to reality. I'm on board. Hell, I've been happy doing janitorial work. Was it my passion? Well, no. But it needed to be done, and I could do it, they're paying me, and in the end there's something satisfying about a clean floor. That was enough for me at the time.