There are a few insects that can be in wheat. Usually at harvest time, any insects harvested by the combine get into the grain bins and die soon after, as they do not feed on wheat. And then there are storage insects, or bugs that specifically feed on wheat. Unless your wheat was recently harvested, within say a week, it will probably be the storage insects you are looking at. The main cause of insects in storage for farmers is improper moisture content, and or grain temperature.
I would suggest drying the wheat when you first get it, to a moisture content of below 14.5%. Wheat will store for decades, and never have a bug infestation, as long as the moisture content is low enough. Also, if you store it in your freezer, you will have no issues either.
Diatomaceous earth is used on the farm if an infestation is expected, or you are storing high risk grain, like damp wheat, or hot grain. But unfortunately, it does not actually work very well on the farm scale for some reason. The main preventative measure is to harvest the grain cool and dry, or to cool and dry it soon afterwards.
One thing you could try, is to use a vaccum cleaner, like a central vac system with the exhaust port on the exterior of the home. The lighter material, including the bugs get blown out the exhaust, but the wheat is left behind.
Just a bit of a backgrounder on how to avoid stored grain insects.