The correct option is: "The building has two ends and two doors."
The sentence indicates that there are two doors in the building, one located at each end of it. Therefore, we can infer that the building has two distinct ends, and each one has a door.