Did I make a mistake in being too honest in the PhD interview?
I want to make two points here, both are indirect answers to your question, but still open to interpretation with regard to your specific interview.
Interviews are less like taking an exam, and more like going on a date. It is possible to do everything right, and still not click. Equally, it is possible that you do many things wrong, but the other person is willing to take a chance on you, because they see something they like and willing to invest on. It is therefore not really worth it mulling over the details of the date in any meaningful sense, since you'll never really know what it was that did or didn't click. Having said that, just like a date, you would want to sound honest, but not arrogant, and generally not put the other person in an uncomfortable position for the sake of 'honesty' if you expect to establish some sort of relationship with them going forward.
There is always a way to rephrase a negative into a positive, and it typically pays off to do so. You come across as a more approachable, less negative person, who sees the good and the opportunity in things, as opposed to the negatives. It's generally a good way to go through life, too. So, in your case, you could have rephrased
"it was boring and it was the prof's fault but I'll look at it if I really have to"
into
"I am reasonably comfortable with the topic; however, I felt it was not given the time it deserved in uni, and my exposure to it so far has been more theoretical. Therefore I look forward to seeing an interesting application of this field in a real-life setting, and to improving my skills in this area: I'm very thankful for the training opportunities on offer in this job -- this is in fact one of the reasons that led me to apply here (blah blah, continue on positive spin)".
Regarding the second point, as a personal anecdote, I was taught this by my own PhD supervisor during my PhD. A large part of my PhD involved improving a field in which one of the most influential papers had many (in my opinion) naïve assumptions which weakened its conclusions. I approached this in my work from the point of view of "we build Y which doesn't suffer from the errors in X, who did bad things x,y,z". My supervisor thought this was unnecessarily harsh and had me rephrase it as "X pushed the field forward by proposing X. We improved on this idea by addressing improvements in areas x,y,z, which we believe make the general direction proposed by X even stronger".
Now, "technically", both versions say exactly the same thing, and both are 'honest'. However, imagine I wanted to invite Prof X to be my external examiner in my PhD viva at the end of my PhD. Which of the two formulations do you think would predispose them more positively towards my thesis?
It probably depends how you put it.
If you said: "I find machine learning boring, because my prof taught it in a boring way.", and machine learning is a key technique in the PhD: Yes, this was wrong, and for obvious reasons. (Then again, if you really find it boring: Why did you apply for that position in the first place.)
If, on the other hand, you made it clear that you had issues with machine learning & you were skeptical about certain points, since those were swept under the rug in your lecture, but you generally made it clear that in fact you would like to understand the topic better, this can in fact be beneficial: It makes it clear that you are actively thinking about the topic, that you are a critical thinker, and that you would like to understand things better. This is far better than someone who just says "Yes, topic X is great." just because it is listed in the job advertisement.
Possibly you made a mistake, but only the professor can judge that. But, honesty is still a good path here. Better that than to wind up in a situation that isn't productive for you.
You want a position in which everyone is comfortable. Hiding your feelings or your background is probably counterproductive.
But the past is the past and can't be undone. Work on other options in case this one doesn't work out.
But, if all of your options involve machine learning, then a somewhat more positive statement is that you feel unprepared as your course was poorly done. If you are willing to work on it (not "I hate it, but...") then this might be enough. But if ML really isn't your cuppa-tea then move on.