White House chief economic advisor Gary Cohn said the administration failed in its attempt to cut a hedge fund tax loophole even though it was a key campaign promise.

Axios co-founder Mike Allen asked Cohn what was the one change he would make to the tax reform bill.

"We would have cut carried interest," Cohn said Wednesday. "We probably tried 25 times."

He blamed resistance on Capitol Hill. "We hit opposition in that big white building with the dome at the other end of Pennsylvania Avenue every time we tried," he said in the interview. "It is just the reality of the political system."

The Republican tax plan keeps the so-called carried-interest loophole that benefits managers of hedge funds and private equity funds. Carried interest is the money manager's cut of the fund's profit. It is taxed at the lower capital gains tax rate, while profit in other professions is taxed at the higher ordinary income rate.

President Donald Trump promised during his campaign that he would eliminate this loophole, saying hedge fund managers were "getting away with murder."

But Cohn told Axios that the hedge fund and private equity lobby was too strong to overcome. "The reality of this town is that constituency [hedge funds and private equity] has a very large presence in the House and the Senate. They have really strong relationships on both sides of the aisle," he said. "We just didn't have the support on carried interest."

Cohn, formerly the No. 2 executive at , claimed Trump was exasperated over the loophole remaining in the bill as recently as this week.

"We had a conversation on carried interest [on] Monday," Cohn said. "He wanted to know if we can take it out of the bill. He said 'how does this keep surviving?'"

— CNBC's Liz Moyer contributed to this report.