There's a huge Chekov's elephant gun you need to be aware of when playing a mystery game: The mystery is there to be solved! There's nothing interesting about not solving the mystery.
So since the players are going to solve the mystery anyway, the big question in the game shouldn't be about -if they can-. They can and will. It should be about -how they do- and -what it costs-. The former is your players' domain. The latter is (as the GM) yours.
Fate insists on sharing information with the players in the form of aspects. Players need to know about the aspects in the game, including aspects about your mystery, to be able to play as intended. So hiding away those aspects kills a Fate game quite quickly.
So you need to lay your mystery open on the table. And let your players tell you how they solved it.
Meanwhile, you should ask them a lot of questions about how they solved the mystery. And act on their answers. Challenge them, let them bleed on the way. Take your toll.
Put up obstacles and opposition they must defeat to get to the result, and make them roll. But never let failure stop them. Make failure cost them.
Mess with their characters as much as you can. Being "taken out" in Fate does not necessarily mean that the character is out of the game. It means that the player temporarily loses their control over the character. When you take them out, grab their sheet and rewrite one of their aspects. Swap some skills. Tie what you just did into the story.
One of the outcomes in Fate is "success at a cost". Offer them devil's deals whenever they roll poorly. Tell them that they can still make that interrogation subject sing like a mockingbird, but it is going to cost them their "badge of honor" aspect.
The mystery will eventually be solved, but the characters that solved it won't be the exact same characters the players began with. They will have changed along the way and the story will be about that change.
You seem to want to have different games
And that's OK to have different wants and needs, but to play together, you need to be on the same page.
Tools that I have used to get on the same page with my players:
Session 0
You can repeat it any time you want. General description is here: What is a session 0?
You set up a session, but instead of actually playing, you are supposed to talk with your players about the game they want to play, the game you want to DM, and how you can meet in the middle and make it enjoyable for everyone.
Same Page Tool
If you don't know what exactly you should tell and ask during Session 0, you can use Same Page Tool. It is a list of questions you and your players should read together, answer, and discuss. It is not perfect, granted, but it worked well for me in the past.
So what to do in your specific case?
I never been in this specific situation, but I have been in situations when my expectations did not meet expectations of my players.
To me, it seems like the players see this game as a "puzzle" to be solved, rather than a story to experience or a world to explore.
For me, this looks like the exact opposite. Take the gate situation. You have set up a puzzle, one and only way to solve that puzzle, and your players wanted to experience the situation like it was life, with many ways to achieve their goals. Similarly with the darkness - magic users should be able to recognize what spell or magic effect is it. Or at least they should have a chance to try. That's the rules. It was against your puzzle to do so, so you just said no.
So they do want enjoy the story all right. They just refuse to go where you try to railroad them.
From my experience, some level of railroading is needed for DM to prepare, and it is best to tell your players directly that you are not able to prepare for each and every course of action they want to take, sorry, day has only so many hours. On the other hand, I never had players that enjoyed a game with one and only way to solve an issue. If you know exactly what they will be forced do, you don't need players anymore, right?
Let me stress this: railroading is not bad, per se. At least some of it is indeed needed for DM to prepare. But leaving enough wiggle room for players is usually needed for them to have fun. And it is a matter of agreement between players and their DM to decide how wide or narrow this railroad will be, what is and isn't acceptable, and how to communicate about it during sessions.
should I just call them and apologize that the session I had prepared was not what they expected
Yes, you should call them. You should also state that their playstyle was not what you expected, and that is OK, it is a misunderstanding. And then you should ask them to meet for session 0 to make sure you can manage your expectations, and it goes both ways.
Or should I (...) write off the time I spent preparing it as a loss?
Definitely not! After session 0 you will need to adjust it, sure, but no need to throw it all out. From what you wrote I guess you will need to prepare for a more open world with less railroading, but you should establish things like that with your players, not with strangers from the Internet like me.
"This is bullshit. You can't just make up stuff as you want."
Actually, you can. You are their Game Master and making stuff up is literally your job. Stuff you make should fit well with the existing game mechanics, and that's something you need to discuss with your players, but you are free to add effects that are not n the books for the sake of the story. Player who said that owes you an apology in my eyes.
Best Answer
A few thoughts: unless your player characters are supposed to be on par with Sherlock Holmes, solving crimes based on nothing more than clues available at the scene, there should be quite a bit of legwork and talking involved in an investigation. It sounds like you're looking for a closed room murder ("all the windows and doors were locked from the inside!"), but if you set the murder on the night of a big party at the same location, you have instant access to a slew of potential suspects and witnesses. Even if the murderer wasn't attending the party that night (which might be a clue in and of itself: "why wasn't Lord Crawford at the party last night?"), you could easily place someone who knows something in the crowd.
Second, just because a murderer has access to magic doesn't mean the actual murder itself was magical in nature. Even a powerful wizard might turn to a dagger or nearby heavy blunt object in a fit of rage. A dagger in the back is clearly (though perhaps misleadingly, if it was placed there postmortem) mundane. As far as clues, the wizard may have escaped via dimension door, but perhaps footprints (ink from an inkwell knocked over in a struggle, or blood) leading away from the corpse suddenly vanish in the middle of the room, or a magical fetish or used spell components or what have you lie discarded on the floor. A murder, even a premeditated one, can be very unsettling to the murderer, who may not have the presence of mind to be very careful.
Lastly, you could provide the characters with a foil (an assistant or out-of-their-league detective, depending on why the characters are in charge of the investigation) whose purpose is to ask leading questions that you can use provide clues if they are struggling ("the murderer came in this window, right? Then why does it look like it was forced open from this side?").