I see that Tim already gave my answer:
If you have only the harmony of the classical cadence tonic, dominant subdominant a transcription to major from minor and vice versa is no problem.
But here we have somewhat a phrygian cadence. (only that there's not a major V) It's almost impossible to transcript to the parallel key if you don't keep the VII major chord unchainged (as it has been already a major in the original version.
Another possibility would be to adapt the melody (like it is use in classical sonatas aswell in the subject of a fuga:
Instead of transforming the theme la mimimire mi mi sore to do sososofa so so ti fa you could transform it this way: so mimimire mi mi sore That means instead of transcribing to the parallel key Dm -> D of you change to the relative key.
And this here is actually the link I was looking for: min.5:11
Maybe the point with the problem you have will be explained to you
where it's said:
(2) In descending, the upper note of the mode's tritone (B when untransposed) was often flatted to avoid the tritone if the lower note (F when untransposed) was present. In ascending, the same problem was solved by raising the lower pitch.
(3) Upper auxiliary tones (upper neighbor tones) were typically flatted in practice, though generally not written that way.
(4) The sixth degree in a minor mode could be raised if moving to or from a raised seventh degree, in order to avoid a melodic augmented second. This is the basis of the modern "melodic minor." In certain cases it might be necessary to raise another degree to avoid the aug. 2nd, for example in a Phrygian final cadence where the third is raised to major and a voice passes from the second degree to the raised third degree.
(5) Internal cadences could be formed on any degree, with one tone raised to form a leading-tone. But the modes had characteristic differences in the tones on which such cadences were formed. Jeppeson identifies these patterns, with the three most common cadences as follows ...