Based only on the information you've given, here's my guess.
Your SIM works in another device, so we can assume for the moment that the SIM itself is fine. That leaves your GS4. You said it's used. I'm going to assume that the SIM card slot/reader in the GS4 is defective or damage, which is why the seller was selling it -- hoping to dish it off on someone else and be rid of the problem.
So, now you're stuck with it... I'm guessing you'll have to send the device in for repair.
Buyer beware. If you're going to buy a used device, always meet in person (preferably at a carrier's store so you can verify the device works properly and isn't stolen). I would never buy a used device online unless I knew for sure I had some sort of buyer protection if something like this happened.
I'm sorry to hear you're having trouble. I hope it's a simple solution and not indeed a defective/damaged device.