WASHINGTON - A defiant President Trump declared that he has all but given up on negotiating with Congress over his border wall and will build it on his own even as he dismissed any suggestions of wrongdoing in the investigations that have ensnared his associates.

In an interview with the New York Times, Trump called the talks “a waste of time” and indicated he will most likely take action on his own when they officially end in two weeks. At the same time, he expressed optimism about reaching a trade deal with China and denied being at odds with his intelligence chiefs.

Addressing a wide range of subjects, Mr. Trump brushed off the investigations that have consumed so much of his presidency, saying that his lawyers have been reassured by the departing deputy attorney general, Rod J. Rosenstein, that the president himself was not a target. “He told the attorneys that I’m not a subject, I’m not a target,”

Mr. Trump added that he never spoke with Roger J. Stone Jr., his longtime associate who was indicted last week, about WikiLeaks and the stolen Democratic emails it posted during the 2016 election, nor did he direct anyone to do so.

Trump said he played no role in directing White House officials to arrange for Jared Kushner, his son-in-law and senior adviser, to receive a top-secret clearance. Mr. Kushner’s application was rejected at least once after concerns were raised by the F.B.I. about his foreign contacts. The C.I.A., which also raised concerns, has continued to deny him access to “sensitive compartmentalized information.”