|לא אַל-תִּפְנוּ אֶל-הָאֹבֹת וְאֶל-הַיִּדְּעֹנִים, אַל-תְּבַקְשׁוּ לְטָמְאָה בָהֶם: אֲנִי, ה אֱלֹהֵיכֶם.||31 Turn ye not unto the ghosts, nor unto familiar spirits; seek them not out, to be defiled by them: I am the LORD your God.|
|יט,לא אַל-תִּפְנוּ אֶל-הָאֹבֹת וְאֶל-הַיִּדְּעֹנִים, אַל-תְּבַקְשׁוּ לְטָמְאָה בָהֶם: אֲנִי, יְהוָה אֱלֹהֵיכֶם.||לָא תִּתְפְּנוֹן בָּתַר בִּדִּין וּזְכוּרוּ, לָא תִּתְבְּעוּן לְאִסְתַּאָבָא בְּהוֹן: אֲנָא, יְיָ אֱלָהֲכוֹן.|
But there are differing nuschaot in Onkelos, with the majority having a zayin.
I don't think this is such a challenging problem. It is possible that both are correct, but at the least, the one with the zayin is correct. Now it is true that there is the daled/zayin switch-off between Hebrew and Aramaic. And it is also probable that "male-genital" in this case is derived from the word zachar, "male," which indeed has the daled/zayin switchoff.
However, there are some words that have zayin in both languages, and some words which have daled in both languages. This is a result of the historical development and divergence of the two languages. There was initially a third sound, probably pronounced dh as in the English word "either," and it a mix of daled and zayin. It mapped in Hebrew to the zayin and in Aramaic to the daled. But words which were initially pure daled or pure zayin would remain constant between both languages.
Such a division would only occur in the development of the language. But if words were borrowed subsequently, as loan-words, who says that they would conform to this divergence. After all, Aramaic also has a zayin, and speakers would not necessarily modify the word to conform to the etymology. Who says the typical speakers of an organic language are grammarians?! And as this is a word prone to slang, it makes sense as a late borrowing.
Indeed, these seem to be the facts on the ground. As Jastrow writes on page 400 in his dictionary... well, look at the image to the right. The top entry is for the Hebrew word zachrut. The bottom entry is marked ch. same, which means Chaldean, that is Aramaic, of the same. And it is zachruta, with a zayin. And he gives multiple examples of clearly Aramaic words, with Aramaic suffixes and context, such that it has a zayin there.
Meanwhile, for דכר with a daled, Jastrow has an entry in Aramaic for "male," but not for "male genitals." Perhaps those texts with the zayin represent a correction by speakers of the language, or later writers of the language, such that it is a genuine entry. But it would seem somewhat likely to me that some scribe, knowing it to be Aramaic, would correct it in some manuscripts.