The judge threw out the case after hearing evidence from Buildstone and the Department of Education and Employment, the CITB's supervising authority, during a two-day hearing.
The judge ruled that Buildstone did not have a right of appeal. But it is understood that the firm may go to the Court of Appeal.
If Buildstone were to win an appeal, the CITB would have to scrap the levy.
CITB chairman Hugh Try said the body was delighted with the result. He said: "The judge has resoundingly supported the levy agreement. In particular, the judgment clearly upholds the right of the secretary of state to set a differential levy when the industry recommends it and the secretary of state is in agreement."
Lawyers for Buildstone declined to comment.