Therapists seem to use the terms empathic failure, empathic lapse, or empathic miss in similar situations.
"Empathic failure" is the term used in the psychotherapeutic literature to describe an interaction in which the therapist
misunderstands the patient. —Suzanne Bender & Edward Messner,
Becoming a Therapist: What Do I Say, and Why?
This definition is from a section entitled "What is an Empathic Lapse?"; apparently these authors prefer the term "empathic lapse" as less harsh, but unfortunately the page with that explanation is omitted in Google Books.
Similarly, in a blog post entitled "Psychotherapy: Empathic Failures, Great and Small" another therapist says
At times, we may presuppose a client is feeling one thing and not be
attuned enough to them to realize that they feel something else. . . .
I am . . . talking about . . . the failure to connect with our clients
in [a] way that is meaningful. . . . Many times these types of failures
occur when we, as therapists, fail to keep our own emotions and
relational “baggage” out of the therapy with another person. . . .
Each empathic miss, large or small, becomes an opportunity to learn.
Lapse, by itself, seems like it would work in context; the OED online defines it as
A ‘slip’ of the memory, the tongue, the pen, or †the understanding; a
slight error, a mistake
and the "slip of understanding" definition seems apropos.
A less technical term, which still carries a slight whiff of psychology, is disconnect:
a lack of connection; a failure of two things to relate —Cambridge
"Disconnect" comes up in literature on empathy, though not always with the particular meaning you ascribe. I think it would work to describe the relationship between Tim's feelings and John's feelings, though perhaps not exactly John's error.
Before speaking to Tim about the death of Tim's father, John was sad
because he empathized with Tim. However, Tim was actually relieved and
happy about his father's death. Tim's father was an abusive alcoholic,
and constantly assaulted and emotionally tortured his entire family
for 30 years. John's empathic failure/lapse/miss made for an
. . . . This disconnect made for an awkward conversation.