I tried following things
1. installed .net framework 4.6
2. installed windows features mentioned in guide
but even after that I was getting the error. so after trying different options, I realized that my machine does not have MS SQL.
After installing MS SQL 2012 express, installation finished without any error but when I launched the web page I got .Net exception which I resolved using https://devnet.kentico.com/articles/kentico-9-and-the-windows-10-april-2018-update. Before that I upgraded my .net framework to 4.7.2.
after all my knetico installation was successful.