I had two hard drives an empty one and a full 1tb drive.
I accidentally chose the wrong icon and formatted it with the setting for mac os jounaled encrypted and selected a pass for it.
Is there any way to get it back?
Depends on what exactly you have done, and which OS version.
Encrypting your hard drive shouldn't delete data, it should encrypt it. Now if you have forgotten the password, that's tough. There is no way to get the data back without the password. That's the idea of encryption.
However, some clever guys at Apple realised that some common reason for data loss is exactly that - user switches on encryption, types in a password without writing it done, and the data is gone. Therefore, with new OS software, you need to type the password once again, otherwise nothing gets encrypted.
So there's a chance that you can just change back to "OS X Journaled, not encrypted".