You can buy an S&P 500 index and short exactly the holdings in the three stocks you want to remove to achieve this. Shorting comes with fees, but it's the closest you can get with normal human amounts of capital
With the direct indexing products many brokerages have rolled out lately, you can now also create your own subset, superset and/or re-weighting of an index and invest in that.