I found that we can create heat map with the javascript api 3.x, but I haven't found such functions in 4.0, can we do it?
Looking at the available renderers I would say no: Renderer | API Reference | ArcGIS API for JavaScript 4.0
You're both correct. The heatmaprenderer is not yet part of the 4.x API. See the functionality matrix for more information about which 3.x capabilities are not yet available in the 4.x API.
https://developers.arcgis.com/javascript/latest/guide/functionality-matrix/index.html
where is 3.17 api available for download?
Both 3.x and 4.x API and SDKs are available for download at https://developers.arcgis.com/downloads/. Use the version dropdown to pick the version.