Writers have been known to inspire one another. They borrow from each other's ideas by expanding on discussion points, debating issues, or writing original pieces based on what they learn from previously written pieces. They very rarely accuse one another of plagiarism because not all thoughts are original and nobody holds the rights to any given thoughts. Similar writing happens all the time. It is not automatically ruled as plagiarism by a thinking person. A plagiarism software is a different matter.
It is clear to anyone who reads your story that yours was a case of inspiration and writing based on what you learned. I but the dean and your professor studied your paper, with your professor eventually .His mistake gave you a second chance at writing. The subsequent grade could have been a product of the realization that similar topics maybe written similarly at times.
Congratulations on a job well done (twice) !