Tony,
As the error says, your tileset must provide availability. That means the “available” property of the terrain provider must not be undefined. Otherwise sampleTerrainMostDetailed can’t tell which tells exist, so it can’t request the most detailed ones in an area. For CesiumTerrainProvider, this means your layer.json must include the “available” property. Here’s an example of one that does:
http://www.ga.gov.au/terrain/terrain/layer.json
Each element in the “available” array is for a level of the tile hierarchy. i.e. the 0th element is for level 0, the 1st element is for level 1, etc. Each element itself is an array of rectangles of tiles that exist at that level. startX/startY/endX/endY specify the range of tile indices within that level that exist. The values are inclusive.
Kevin