The conecter that goes to the hard drive has a white dot on It. It needs to be facing up. It will connect two ways. If you install it wrong the fan will run fast and it will be noisy. You have to open it again and turn it over. There is a repair manual on ifixit.com. You need to know your EMC number. It is on the bottom of the stand. For instance mine was EMC 2308. It sounds like we the have same computer. I replaced my drive on an early 2009 21 1/2 desk top. Good luck. If you have any other question about down loads etc. post a comment.
Here is a link for the repair guide you need . Tap on or click on the blue link. I think this should help.
iMac Intel 27" EMC 2309 and 2374 Hard Drive Replacement