If the transmission and clutch are stock, it is very likely a failing dual mass flywheel, which is a fairly common and eventual failure on the G56 transmission.
If the truck is OTHERWISE in good condition, it does not have to be a deal breaker, though you will DEFINITELY want to replace the clutch and flywheel with a quality upgrade, maybe one from Southbend Clutch, that uses a speciaclly designed standard flywheel and ONLY quality clutch, bearing and hydraulic components. Even if the knocking that you are hearing is "only" something wrong with the throwout bearing, you will need to pull the transmission to fix it and it is a dam good time to upgarde the clutch ANYWAY. Either way, it ought to knock at least $1200 off the price of the truck, if you can do the work yourself, or $2000 if you will have someone else do it.
ON EDIT--
ACTUALLY, if the truck has had power upgrades added to it and been used for towing, you may well want to avoid it, becuase it IS possible that if the DMF has been failing for awhile and if the transmission has been unsed in highly load conditions, that the actual aluminum case of the G56 may be ruined, which is something you won't fiond out until you get into it and will cost MUCH more then the clutch repair. This is likely ONLY in over powered or highly loaded conditions for the g56, so if the truck is otherwise stock and NOT seen an extensive life as a tow vehicle, then the transmission case is likely OK. In general, anyways, it is MUCH better to buy a trcik that has been UNmodified, at least to the powertrain.