Even though, at the time of the destruction of the first Beth Hammiqdash (Temple), the walls were breached on the ninth (9th) of Tammuz, since, when the second Temple was destroyed the walls were breached on the seventeenth (17th) of Tammuz, that was the day that that was designated as a fast day. The reason being that the destruction of the second Temple is more serious for us.
Our Hakhamim of blessed memory could have also designated the 9th of Tammuz as a fast day since the walls of the first Beth Hammiqdash were breached then, but did not wish to place an additional burden on us. Neither should a person take this fast upon himself as a private fast.
In addition, it is written in the Yerushalmi (Jerusalem Talmud) that at the time of the destruction of the first Temple the walls were also breached on the 17th of Tammuz, but because of all their suffering they erred in its calculation.
(See Sefer Hilkhoth Haggim, Maran Mordechai Eliyahu, 'a"h)