In most cases, if you really want to use a P2PK transaction, you would have to ask the receiver to tell you their public key.
You can't determine the public key from the address alone. The address is a hash of the public key, and hash functions are one-way. So if all you have is an address, you can't use a P2PK transaction.
If the receiver has previously had other transactions sent to the desired address, and has spent at least one of those transactions, then the public key was included as part of the spending transaction's signature. So in that case, the public key is in the blockchain, and you could use it to make a P2PK transaction.
I'm not sure why you would bother, though. P2PK transactions are pretty much obsolete, and P2PKH should be used for all normal purposes.