The high cost comes from having to mobilize polling locations, poll workers, logistics for voting infrastructure, ya know, all the stuff that goes into making an election happen.
Special elections like this need to have all the same setup as a general election, but since it’s focused around one (or a handful) of issues, AND the general election still has to take place in November, it’s pretty wasteful. I’ve seen the estimates are around $20-30 million to make a special election happen.