Although they are not Jews they are Israelites and we might as well call them Jews
After the death of King Solomon, the Israelite kingdom slipt and the northern kingdom was called Israel, recalling Jacob, Israel, while the southern kingdom was called Judah, after the tribe of Judah. Thus, the term Jew is shorted for Judeans.
Similarly, the name Samaritan is named after Samaria, north of Jerusalem. They claim to be Israelites since they say they are from the Northern tribes of Israel, “The Ten Lost Tribes”. Today we might call them Jews since we refer to beta Israel (Ethiopia) as Jews, despite the fact that they are not from Judea. The idea that the Assyrians displaced all of the Jews in the Northern kingdom of Israel with Cush “Cutheans” is mistaken. The vast majority of Jews remained. Rabbi Bar-Ron explains:
The inhabitants of Samaria were, for the most part, the remainder of
those tribesmen who were vacated by Assyria, only subdued. Only the
warriors, the educated elite and highly-skilled had been exiled. That
the majority remained, for which we have the official Assyrian records
and hints in Na"Kh (Prophets and Writings) to prove it... The
inscriptions of Sargon II clearly show that a total of 27,280 people
were deported. (Nimrud Prisms, COS 2.118D, pp. 295–296) Even if one
adds several thousand who would have died in the war, it is clear that
a healthy majority remained in the Land. Samaritan traditions do
recall the influx of many foreigners into the land, brought in by the
Assyrian conquerors, but their paternal genetics (overwhelmingly J1
and J2) support Samaritan oral tradition that they accepted no men
into their community from among those foreigners. Only women, who
were converted. It is the exact same pattern as we see for Jewish
communities throughout history. (In fact the mtDNA of the females of
the community is nearly identical to that of the females of the Jewish
Iraqi community.) Rabbi Akiva clearly suggests those conversions
were recognized, in his words brought in the Talmud Bavli Qidushin
75a). Their purity as Israelites and even the purity of their path
was not lost to the Nassi of the Sanhedrin in his day, Rabban Shim`on
ben Gamliel, who held them to be as kosher Jews in every regard (" רבן
שמעון בן גמליאל אומר כותי כישראל לכל דבר"
- Jer. Talmud, tr. Demai 14,1). The Mishnah ruled that the could be counted to form a "zimmun" for Birkath HaMazon (BT Berakhoth 45a).
The Nassi went as far as to say, “any religious duty which the
Samaritans preserved, they observe with far greater punctiliousness
than Israelites [Jews].” ( "כל מצוות שהחזיקו בהן כותים הרבה מדקדקין
בהן יותר מישראל" - ibid. 47b and Tosefta Pesaḥim 2,3). In II
Chronicles ch. 30 we see that after the exile of the Kingdom of Israel
(the Ten Tribes), the king of Judah was sending messengers to the
Northern Tribes still in the Land (see II Chr. 30:5) to join Yehudah
in a great Passover celebration. Large numbers of the Israelites of
those regions were never exiled! That is what empires like Assyria
did to defeated kingdoms. To transfer an entire population was not
only unnecessary overkill, it would have been prohibitively expensive.
On the contrary, they would effectively "decapitate" their defeated
peoples: taking captive their ruling class, military men and the
educated, leaving the simpler masses (kohanim, farmers, ranchers,
etc.) unable to rise and achieve independence.
When II Kings says that all the Jews left this is hyperbolic and means “many.” This is why the Samaritans call themselves Bnei Yisrael, Israelites.[1] Thus, they are monotheists and we can pray at their houses of worship.
[1] In the Bible, the Hebrews, or Israelites of the Bible are also called Bnei Yisrael.
Also, see this essay here, which argues that Jews and Samaartians unmistakeably share the same genetic information (common ancestry).
PS If we can pray at a Muslim mosque (Muslims are monotheists), which is halachically acceptable even though they hate us, I find it a degradation that answers here tells us that we should not worship alongside our brothers.