Spatial Index Compression
Your syntax for ALTER INDEX...REBUILD WITH (DATA_COMPRESSION...) is correct.  The problem is actually revealed in the error message:


  Invalid usage of the option data_compression in the ALTER INDEX
  REBUILD statement.


For a spatial index in SQL Server 2008, using the data_compression option is not supported. According to Microsoft Documentation, support for data compression was added for spatial indexes in SQL Server 2012:


  DATA_COMPRESSION = {NONE | ROW | PAGE}  
  
  Applies to: SQL Server 2012 through SQL Server 2017, SQL Database.


If/when you upgrade to a newer version of SQL Server, your original ALTER INDEX statement would work to rebuild the index using PAGE compression. Alternatively, as @AaronBertrand points out in a comment, you can also use CREATE...WITH (DROP_EXISTING=ON, DATA_COMPRESSION=PAGE... to change the compression settings, however this requires re-supplying the entire index definition, where the ALTER requires you only specify the options you are altering.