@Dibu You’ve not provided enough of the build log to know for certain, but it looks like exit code 254 occurs when it cannot find a package.json.
Check if your build log does mention that being the issue.
No matter how you run your build, you can use the Deploy File Browser to see what you’ve submitted to Netlify. If there is no index.html then you’ll see that 404 error.
If you’re still stuck provide your full build log (not just the error code section).