gameobject to vector3

I have several objects stored as GameObjects in my script, and I need to get their current position as a Vector3 so I can use them in a function. I thought it would be simple (and it probably is), but I can’t figure out how to do it.

gameObject.transform.position