The tunnel is the object, not the subject, of "build", so "have built" is definitely not correct. "to be built" can give more of a sense of "time until building", whereas "to build" gives more of a sense of "time spent building". For instance, if planning on the bridge started in 2000, but construction didn't start until 2003, and construction ended in 2020, then one could say "The bridge took 17 years to build", but "The bridge took 20 years to be built". Those two phrasings do overlap, however, so either one could be used for either meaning, but those are the main meanings. I find "It took 17 years to build the bridge" and "It took 20 years before the construction of the bridge was finished", respectively, to be more natural, though.