You analogized a gun with fingerprints. In the case of the phone, that it was the suspect's phone is not in doubt. So the analogy assumes that the gun with the fingerprint belongs to the person being asked to provide a fingerprint, same as with the phone.
Now, do the police have probable cause to ask the owner of a gun to provide a fingerprint to match one found on a gun? I think so, at the very least to rule out the owner as the last to touch the gun.
Now let's change the hypothetical slightly. The owner of a gun already has fingerprints on file from the purchase of the gun, so the police would already have checked that without the gun owner's involvement. So let's say the the gun was found in the possession of someone else. Do the police have probable cause to ask the possessor of a gun to provide a fingerprint to match one found on a gun? Again, I think so.
This would not be a random person stopped on the street, - would be someone found in the vicinity of the gun/phone, with a probable connection to it.
Finally, checking a fingerprint on a gun does nothing to alter the state of the gun, but swiping the fingerprint on the phone changes the state of the phone.
-PJ
Can the court compel you to provide a combination to a safe found in your home? There is some dicta that says that a court can compel you to provide a key to a lockbox and that is somehow different from compelling you to provide a combination. IOW, this conversation is not about what the law says but about what the law should be.