Birds can be quirky creatures... I had a conure that was "okay" (as in, tentatively okay, but not *really* okay) with getting head scritches when I first got her, but could not step up onto hands! I did manage to get her to the point where she was okay stepping up onto hands, but then she'd make a mad dash for my shoulder, where she felt safest. She also had an odd behavior at first where if I approached her cage, she would scamper away in fear, but when I walked away, she'd attempt to follow me - without actually leaving her cage.
If you can figure out what's causing the behavior, that may help, but it's not always possible. If that's the case, then you just need to figure out how to reinforce being able to pet her without scaring her. Treats may help!