That method cannot be used on a file geodatabase, from the tool help document, see usage statement below:
Data must be from a database or an enterprise, workgroup, or desktop
geodatabase. This tool does not work with file or personal
To add an index to an existing feature class within a geodatabase you may use the Add Attribute Index or ...