Though I'm not aware of a source which directly speaks out the metaphor Jordan Peterson uses, there is room for such a metaphor based on traditional Jewish sources.
The Hebrew text of Genesis 4:7 reads:
הֲל֤וֹא אִם־תֵּיטִיב֙ שְׂאֵ֔ת וְאִם֙ לֹ֣א תֵיטִ֔יב לַפֶּ֖תַח חַטָּ֣את רֹבֵ֑ץ וְאֵלֶ֙יךָ֙ תְּשׁ֣וּקָת֔וֹ וְאַתָּ֖ה תִּמְשָׁל־בּֽוֹ
After saying that the sin crouches at the entrance, the verse says "It's desire will be for you, and you can rule over it."
This is the exact phraseology used earlier in Genesis.
When describing the curse Eve received for eating the forbidden fruit the verse (Genesis 3:16) states:
אֶֽל־הָאִשָּׁ֣ה אָמַ֗ר הַרְבָּ֤ה אַרְבֶּה֙ עִצְּבוֹנֵ֣ךְ וְהֵֽרֹנֵ֔ךְ בְּעֶ֖צֶב תֵּֽלְדִ֣י בָנִ֑ים וְאֶל־אִישֵׁךְ֙ תְּשׁ֣וּקָתֵ֔ךְ וְה֖וּא יִמְשָׁל־בָּֽךְ
And to the woman He said, “I will make most severe Your pangs in childbearing; In pain shall you bear children. Yet your desire shall be for your husband, And he shall rule over you.”
What does it mean that Eve's desire will be for her husband? Explains the classical commentator Rashi:
ואל אישך תשוקתך. לְתַשְׁמִישׁ, וְאַעַפִּ"כֵּ אֵין לָךְ מֵצַח לְתָבְעוֹ
בַּפֶּה, אֶלָּא הוּא יִמְשָׁל בָּךְ, הַכֹּל מִמֶּנּוּ וְלֹא מִמֵּךְ
The phrase "Your desire for your husband" refers to your desire
for marital relations. Yet despite [your desire] you won't have the
audacity to verbally demand it. "He will rule over you" means he will
initiate it, not you.
So we see that the same phrase is used to refer to Eve's desire for sexual intimacy and her husband's ability to regulate such connections; as well as sin's anthropomorphic desire for Cain, and Cain's ability to regulate it.
This would support Peterson's explanation that the metaphor has a sexual undercurrent.