In this case it’s even easier than deleting the code. In your wordpress dashboard "Settings -> Discussion -> Allow people to post comments on new articles " and uncheck the box. scroll down and press save at the bottom.
To answer your question about ftp tho, when you log into FTP you will be in your home directory. Their you should see a directory named after your domain name, change into that directory by clicking it. If your wordpress install was originally in the root directory your index.php should be there. If your wordpress was originally made to a sub-directoy like wp, wordpress, blog or something else then you should see that directory in your DOMAINNAME.COM directory, change into it and you index.php should be there.
In general, the better way is to just turn off the feature, because that setting will survive upgrades. If you edit your index.php you will have to edit it again every time you upgrade your wordpress to the latest version.