Its not very easy to get trapinch on heart gold or soal silver but you can. First you go to the safari zone, next you must talk to the owner, he'll ask you if you want to take the test to own the safari zone. He will ask you to go into the safari and catch a geodude, show him the geodude, next he'll ask you to catch a sandshrew in the safari. Show him the sandshrew, after this he will give you his number, after a few days he will call you and tell you that you can add objects in the safari. These objects help you find different pokemon in the safair (such as trapinch). The first objects he gives you won't be the objects to lur trapinch. The secound time he calls you he will say he added new objects, go to the safari and change one of the safari areas to "desert" by using the computer by the desk where you enter. Go to the desert area and set the objects by pressing "A". The objects you need to set are the rocks, you need to set 25 rocks in that area. After your done trapinch should start appearing.
You can get is from the safari zone
Get it in your pokedex and get it over the global trade station in goldenrod or transfer it from pokemon ruby sapphire or emerald
Go to your pokedex go to Trapinch click on it, then click "Area" look where it is, and then go there and catch it.
Look in grass it is rare