"...at the end of..." is always correct. The expression "in the end" is valid, but it never has "of" after it.
The preposition "at" has the meaning of the location of a specific point, where "in" is less specific. The end of something is a specific place, so it only makes sense to use "at". The expression "in the end" doesn't refer to a specific place, but to the outcome, or end result, generally.
This Google Ngram shows there's a few "in the end of", but they're either non-idiomatic writing styles (like the Bible) or they're about media with titles that start, "The End of...", such as:
In "The End of Policing",..."
Where "The End of Policing" is a book title.