Did you get a front rim? If so.. Ya, that will work as a spare.
The rear will work also, just look funny because it will stick out farther.
Lug pattern is the same.
Some may question the load rating of the wheel, but as long as it stays a spare you will be fine.
Thanks.