Since the pentagon and WTC had military offices wouldn't this make it a military target according to the applicable international treaties such as the Geneva conventions?
Civilian objects shall not be the object of attack or of reprisals. Civilian objects are all objects which are not military objectives as defined in paragraph 2.
Attacks shall be limited strictly to military objectives. In so far as objects are concerned, military objectives are limited to those objects which by their nature, location, purpose or use make an effective contribution to military action and whose total or partial destruction, capture or neutralization, in the circumstances ruling at the time, offers a definite military advantage.
In case of doubt whether an object which is normally dedicated to civilian purposes, such as a place of worship, a house or other dwelling or a school, is being used to make an effective contribution to military action, it shall be presumed not to be so used.
The Pentagon is the military headquarter of the US armed forces. Its relevance for the US war machine can not be denied. Destroying the pentagon and killing its personnel would have a negative impact on the US military capabilities worldwide. The 9/11 attack didn't actually cause that much damage to the Pentagon, but the Geneva convention doesn't mandate that an attack must be successful to be legitimate.
But it would be difficult to make the same argument for the World Trade Center. The primary purpose of the building was to house civil company offices. The percentage of offices which could be argued to serve a military purpose was so small that most war crime tribunals would likely rule the collateral damage as unjustified. And besides, if someone would claim that, they would also have to agree that the US government is guilty of committing a war crime for placing military targets densely packed with civilian targets.
However, all of that is of little relevance to the 9/11 attacks, because they were not done by soldiers on the orders of a state government as an act of war. They were committed by a civilian terrorist organization. This makes it not a war crime but a regular civil crime. And civil crimes do not make a difference between murdering a soldier or murdering a civilian.