True, candidates can contribute unlimited funds to their own campaign.
However the candidate is still required to report such contributions of in-kind donations to the FEC as part of campaign finance laws. Now with this just before the election, it still wouldn't have become public knowledge prior to the election because there wasn't a filing due. The next filing would have been after the election.
(Then there is the other aspect which is that the Trump Organization is a separate legal entity from Donald J. Trump the individual. While the individual can make unlimited campaign contributions to his own campaign, can a business owned by the individual? Don't know. Doesn't really matter as that is not charged in the case since the case is not based on federal campaign finance law, it's based on state falsification of business records law.)
WW