genrally, yes, next of kin, is whoever the person naming them says, but where the person is mentally incapacitated, then 'next of kin' is the primary contact.
I looked after an uncle (by marriage) when he became mentally ill. But when the going got tough the psychiatrist just turned to me and said, you are not next of kin. Which was true, my uncle had a brother still living, however, he too as in a care home, but mentally lucid, so I got a signed letter from him saying he was not able to take on any next of kin responsibilities and he was handing them to me.
It meant I had to be informed of everything happening to my uncle and could query anything, even if I had no legal rights until we had sorted out the LPA.